summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-11-26 23:52:18 +0000
committerJim Ingham <jingham@apple.com>2012-11-26 23:52:18 +0000
commit8559a35508222875c5a413dd5ef5df82482bf74a (patch)
treeade6d1f6928db4710cdf15919ce0ff48dc659a4f /lldb/source/Target/Process.cpp
parent110b73e0e530cbe9184a5218e35197d8f0b11825 (diff)
downloadbcm5719-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.cpp9
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)
OpenPOWER on IntegriCloud