[Lldb-commits] [lldb] r135827 - in /lldb/trunk: examples/summaries/lldb source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Jim Ingham jingham at apple.com
Fri Jul 22 17:12:05 PDT 2011


Author: jingham
Date: Fri Jul 22 19:12:05 2011
New Revision: 135827

URL: http://llvm.org/viewvc/llvm-project?rev=135827&view=rev
Log:
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.

Modified:
    lldb/trunk/examples/summaries/lldb
    lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Modified: lldb/trunk/examples/summaries/lldb
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/summaries/lldb?rev=135827&r1=135826&r2=135827&view=diff
==============================================================================
--- lldb/trunk/examples/summaries/lldb (original)
+++ lldb/trunk/examples/summaries/lldb Fri Jul 22 19:12:05 2011
@@ -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}"

Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=135827&r1=135826&r2=135827&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Fri Jul 22 19:12:05 2011
@@ -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);
     }
 }
 

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=135827&r1=135826&r2=135827&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Fri Jul 22 19:12:05 2011
@@ -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);
     }
 }
 

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp?rev=135827&r1=135826&r2=135827&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Fri Jul 22 19:12:05 2011
@@ -118,6 +118,8 @@
                                                                           eFunctionNameTypeBase, 
                                                                           true);
     }
+    else
+        m_objc_exception_bp_sp->SetEnabled (true);
 }
 
 struct BufStruct {

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=135827&r1=135826&r2=135827&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Fri Jul 22 19:12:05 2011
@@ -480,6 +480,8 @@
                                                                           eFunctionNameTypeBase, 
                                                                           true);
     }
+    else
+        m_objc_exception_bp_sp->SetEnabled (true);
 }
 
 ClangUtilityFunction *





More information about the lldb-commits mailing list