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/examples/summaries/lldb b/lldb/examples/summaries/lldb
index 9e626a0..7ede60e 100644
--- a/lldb/examples/summaries/lldb
+++ b/lldb/examples/summaries/lldb
@@ -1,12 +1,13 @@
-type summary add -f "Type: ${var.m_type%E}, Code: ${var.m_code}, Message: ${var.m_string}" lldb_private::Error -w lldb
-type summary add -f "${var.m_string}" lldb_private::ConstString -w lldb
-type summary add -f "${var.m_language%E}" lldb_private::Language -w lldb
-type summary add -f "${var.m_re}" lldb_private::RegularExpression -w lldb
-type summary add -f "UserID(${var.m_uid})" lldb_private::UserID -w lldb
-type summary add -f "${var.m_name}" lldb_private::ValueObject -w lldb
-type summary add -f "${var.ptr_.m_name}" lldb_private::ValueObjectSP -w lldb
-type summary add -f "${var.m_reg_info.name}" lldb_private::ValueObjectRegister -w lldb
-type summary add -f "{${var.m_expr_text}}" lldb_private::ClangExpression -w lldb
-type summary add -f "Command name: ${var.m_cmd_name}" lldb_private::CommandObject -w lldb
-type summary add -f "${var.m_type.m_name} ${var.m_name}" lldb_private::Variable -w lldb
-type summary add -f "ID: ${var.m_stop_id}, ${var.m_description}" lldb_private::StopInfo -w lldb
+type summary add -w lldb lldb_private::Error -f "Type: ${var.m_type%E}, Code: ${var.m_code}, Message: ${var.m_string}"
+type summary add -w lldb lldb_private::ConstString -f "${var.m_string}"
+type summary add -w lldb lldb_private::Language -f "${var.m_language%E}"
+type summary add -w lldb lldb_private::RegularExpression -f "${var.m_re}"
+type summary add -w lldb lldb_private::UserID -f "UserID(${var.m_uid})"
+type summary add -w lldb lldb_private::ValueObject -f "${var.m_name}"
+type summary add -w lldb lldb_private::ValueObjectSP -f "${var.ptr_.m_name}"
+type summary add -w lldb lldb_private::ValueObjectRegister -f "${var.m_reg_info.name}"
+type summary add -w lldb lldb_private::ClangExpression -f "{${var.m_expr_text}}"
+type summary add -w lldb lldb_private::CommandObject -f "Command name: ${var.m_cmd_name}"
+type summary add -w lldb lldb_private::Variable -f "${var.m_type.m_name} ${var.m_name}"
+type summary add -w lldb lldb_private::StopInfo -f "ID: ${var.m_stop_id}, ${var.m_description}"
+type summary add -w lldb lldb_private::FileSpec -f "file: ${var.m_filename} dir: ${var.m_directory}"
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 *