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.

llvm-svn: 123716
This commit is contained in:
Jim Ingham 2011-01-18 01:58:06 +00:00
parent 86a7fcc19c
commit bda4e5eb33
2 changed files with 10 additions and 0 deletions

View File

@ -69,6 +69,9 @@ public:
{
return true;
}
virtual void
WillPop ();
protected:
private:

View File

@ -128,6 +128,13 @@ ThreadPlanCallFunction::DoTakedown ()
ClearBreakpoints();
}
void
ThreadPlanCallFunction::WillPop ()
{
if (m_valid && !IsPlanComplete())
DoTakedown();
}
void
ThreadPlanCallFunction::GetDescription (Stream *s, lldb::DescriptionLevel level)
{