[Lldb-commits] [lldb] r123716 - in /lldb/trunk: include/lldb/Target/ThreadPlanCallFunction.h source/Target/ThreadPlanCallFunction.cpp
Jim Ingham
jingham at apple.com
Mon Jan 17 17:58:07 PST 2011
Author: jingham
Date: Mon Jan 17 19:58:06 2011
New Revision: 123716
URL: http://llvm.org/viewvc/llvm-project?rev=123716&view=rev
Log:
In ThreadPlanCallFunction, do the Takedown right when the thread plan gets popped. When the function call is discarded (e.g. when it crashes and discard_on_error is true) the plan gets discarded. You need to make sure that the stack gets restored right then, and not wait till you start again and the thread plan stack is cleared.
Modified:
lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h
lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h?rev=123716&r1=123715&r2=123716&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h Mon Jan 17 19:58:06 2011
@@ -69,6 +69,9 @@
{
return true;
}
+
+ virtual void
+ WillPop ();
protected:
private:
Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=123716&r1=123715&r2=123716&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Mon Jan 17 19:58:06 2011
@@ -129,6 +129,13 @@
}
void
+ThreadPlanCallFunction::WillPop ()
+{
+ if (m_valid && !IsPlanComplete())
+ DoTakedown();
+}
+
+void
ThreadPlanCallFunction::GetDescription (Stream *s, lldb::DescriptionLevel level)
{
if (level == lldb::eDescriptionLevelBrief)
More information about the lldb-commits
mailing list