[Lldb-commits] [lldb] r124306 - /lldb/trunk/source/Target/ThreadPlanCallFunction.cpp

Jim Ingham jingham at apple.com
Wed Jan 26 11:13:10 PST 2011


Author: jingham
Date: Wed Jan 26 13:13:09 2011
New Revision: 124306

URL: http://llvm.org/viewvc/llvm-project?rev=124306&view=rev
Log:
Make sure that if a CallFunction thread plan crashes while running in the "run to address" mode, and it
is an auto-discard thread plan, the plan stack unwinds properly.

Modified:
    lldb/trunk/source/Target/ThreadPlanCallFunction.cpp

Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=124306&r1=124305&r2=124306&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Wed Jan 26 13:13:09 2011
@@ -149,6 +149,7 @@
         ClearBreakpoints();
         if (log && log->GetVerbose())
             ReportRegisterState ("Restoring thread state after function call.  Restored register state:");
+
     }
     else
     {
@@ -236,7 +237,10 @@
     else
     {
         // If the subplan is running, any crashes are attributable to us.
-        return (m_subplan_sp.get() != NULL);
+        // If we want to discard the plan, then we say we explain the stop
+        // but if we are going to be discarded, let whoever is above us
+        // explain the stop.
+        return ((m_subplan_sp.get() != NULL) && !OkayToDiscard());
     }
 }
 





More information about the lldb-commits mailing list