[Lldb-commits] [lldb] r177691 - Change the AppleObjCTrampolineHandler to always run all threads when resolving the target of an ObjC method call.

Jim Ingham jingham at apple.com
Thu Mar 21 18:28:17 PDT 2013


Author: jingham
Date: Thu Mar 21 20:28:17 2013
New Revision: 177691

URL: http://llvm.org/viewvc/llvm-project?rev=177691&view=rev
Log:
Change the AppleObjCTrampolineHandler to always run all threads when resolving the target of an ObjC method call.
Add a StopOthers method to AppleThreadPlanStepThroughObjCTrampoline, don't rely on the setting in the ThreadPlanToCallFunction, since that
gets pushed too late to determine which threads will continue.

<rdar://problem/13447638>

Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp?rev=177691&r1=177690&r2=177691&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp Thu Mar 21 20:28:17 2013
@@ -1106,12 +1106,16 @@ AppleObjCTrampolineHandler::GetStepThrou
                 flag_value.GetScalar() = 0;  // FIXME - Set to 0 when debugging is done.
             dispatch_values.PushValue (flag_value);
             
+            
+            // The step through code might have to fill in the cache, so it is not safe to run only one thread.
+            // So we override the stop_others value passed in to us here:
+            const bool trampoline_stop_others = false;
             ret_plan_sp.reset (new AppleThreadPlanStepThroughObjCTrampoline (thread,
                                                                              this,
                                                                              dispatch_values,
                                                                              isa_addr,
                                                                              sel_addr,
-                                                                             stop_others));
+                                                                             trampoline_stop_others));
             if (log)
             {
                 StreamString s;

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h?rev=177691&r1=177690&r2=177691&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h Thu Mar 21 20:28:17 2013
@@ -54,6 +54,12 @@ public:
 
     virtual bool
     ShouldStop (Event *event_ptr);
+    
+    virtual bool
+    StopOthers()
+    {
+        return m_stop_others;
+    }
 
     // The base class MischiefManaged does some cleanup - so you have to call it
     // in your MischiefManaged derived class.





More information about the lldb-commits mailing list