diff options
author | Jim Ingham <jingham@apple.com> | 2012-11-26 23:52:18 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-11-26 23:52:18 +0000 |
commit | 8559a35508222875c5a413dd5ef5df82482bf74a (patch) | |
tree | ade6d1f6928db4710cdf15919ce0ff48dc659a4f /lldb/source/Target/Process.cpp | |
parent | 110b73e0e530cbe9184a5218e35197d8f0b11825 (diff) | |
download | bcm5719-llvm-8559a35508222875c5a413dd5ef5df82482bf74a.tar.gz bcm5719-llvm-8559a35508222875c5a413dd5ef5df82482bf74a.zip |
The Function calling thread plan was replacing the stored stop info too soon, causing recursive entry into the
breakpoint StopInfo's PerformAction, which is bad. Reworked this so that it is now correct.
<rdar://problem/12501259>
llvm-svn: 168634
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 3d78dc75338..02f78d4df56 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -4377,6 +4377,9 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, const uint64_t default_one_thread_timeout_usec = 250000; uint64_t computed_timeout = 0; + // This while loop must exit out the bottom, there's cleanup that we need to do when we are done. + // So don't call return anywhere within it. + while (1) { // We usually want to resume the process if we get to the top of the loop. @@ -4784,6 +4787,12 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, } + // Restore the thread state if we are going to discard the plan execution. + + if (return_value == eExecutionCompleted || discard_on_error) + { + thread_plan_sp->RestoreThreadState(); + } // Now do some processing on the results of the run: if (return_value == eExecutionInterrupted) |