Don't delete & remake the exception breakpoints every time you need them. Make them once & enable/disable
them as appropriate.
Also reformatted the lldb summaries to make them easier to read, and added one. I'll do more as I get time.
llvm-svn: 135827
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 00b450e..7a20425 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -265,12 +265,16 @@
"__cxa_throw",
eFunctionNameTypeBase,
true);
+ else
+ m_cxx_exception_bp_sp->SetEnabled (true);
if (!m_cxx_exception_alloc_bp_sp)
m_cxx_exception_alloc_bp_sp = m_process->GetTarget().CreateBreakpoint (NULL,
"__cxa_allocate",
eFunctionNameTypeBase,
true);
+ else
+ m_cxx_exception_alloc_bp_sp->SetEnabled (true);
}
void
@@ -281,14 +285,12 @@
if (m_cxx_exception_bp_sp.get())
{
- m_process->GetTarget().RemoveBreakpointByID(m_cxx_exception_bp_sp->GetID());
- m_cxx_exception_bp_sp.reset();
+ m_cxx_exception_bp_sp->SetEnabled (false);
}
if (m_cxx_exception_alloc_bp_sp.get())
{
- m_process->GetTarget().RemoveBreakpointByID(m_cxx_exception_alloc_bp_sp->GetID());
- m_cxx_exception_bp_sp.reset();
+ m_cxx_exception_bp_sp->SetEnabled (false);
}
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index e62c3bb..5c84f71 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -284,8 +284,7 @@
if (m_objc_exception_bp_sp.get())
{
- m_process->GetTarget().RemoveBreakpointByID(m_objc_exception_bp_sp->GetID());
- m_objc_exception_bp_sp.reset();
+ m_objc_exception_bp_sp->SetEnabled (false);
}
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index 5098e99..ae5cf92 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -118,6 +118,8 @@
eFunctionNameTypeBase,
true);
}
+ else
+ m_objc_exception_bp_sp->SetEnabled (true);
}
struct BufStruct {
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 3cbdc79..80c548b 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -480,6 +480,8 @@
eFunctionNameTypeBase,
true);
}
+ else
+ m_objc_exception_bp_sp->SetEnabled (true);
}
ClangUtilityFunction *