diff options
| author | Jim Ingham <jingham@apple.com> | 2011-01-18 01:58:06 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2011-01-18 01:58:06 +0000 |
| commit | bda4e5eb33be438f73ea698787d3a750f0099fcc (patch) | |
| tree | f4856da384174c71202650e70528845bf6b8220d | |
| parent | 86a7fcc19c91af32f1947e802130dfe68a6b05ce (diff) | |
| download | bcm5719-llvm-bda4e5eb33be438f73ea698787d3a750f0099fcc.tar.gz bcm5719-llvm-bda4e5eb33be438f73ea698787d3a750f0099fcc.zip | |
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
| -rw-r--r-- | lldb/include/lldb/Target/ThreadPlanCallFunction.h | 3 | ||||
| -rw-r--r-- | lldb/source/Target/ThreadPlanCallFunction.cpp | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lldb/include/lldb/Target/ThreadPlanCallFunction.h b/lldb/include/lldb/Target/ThreadPlanCallFunction.h index 2ef39e65249..f9dfaa26cfc 100644 --- a/lldb/include/lldb/Target/ThreadPlanCallFunction.h +++ b/lldb/include/lldb/Target/ThreadPlanCallFunction.h @@ -69,6 +69,9 @@ public: { return true; } + + virtual void + WillPop (); protected: private: diff --git a/lldb/source/Target/ThreadPlanCallFunction.cpp b/lldb/source/Target/ThreadPlanCallFunction.cpp index a662ea0589d..9619f56bb35 100644 --- a/lldb/source/Target/ThreadPlanCallFunction.cpp +++ b/lldb/source/Target/ThreadPlanCallFunction.cpp @@ -129,6 +129,13 @@ ThreadPlanCallFunction::DoTakedown () } void +ThreadPlanCallFunction::WillPop () +{ + if (m_valid && !IsPlanComplete()) + DoTakedown(); +} + +void ThreadPlanCallFunction::GetDescription (Stream *s, lldb::DescriptionLevel level) { if (level == lldb::eDescriptionLevelBrief) |

