summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp2
-rw-r--r--lldb/source/Target/Process.cpp9
2 files changed, 9 insertions, 2 deletions
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index dced0224a28..0386e94e331 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -508,7 +508,7 @@ ClangUserExpression::Execute (Stream &error_stream,
lldb::addr_t function_stack_pointer = static_cast<ThreadPlanCallFunction *>(call_plan_sp.get())->GetFunctionStackPointer();
- // call_plan_sp->SetPrivate(true);
+ call_plan_sp->SetPrivate(true);
uint32_t single_thread_timeout_usec = 500000;
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 70ec107a7e3..d5a441bccba 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -3226,6 +3226,13 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
return eExecutionSetupError;
}
+ // We rely on the thread plan we are running returning "PlanCompleted" if when it successfully completes.
+ // For that to be true the plan can't be private - since private plans suppress themselves in the
+ // GetCompletedPlan call.
+
+ bool orig_plan_private = thread_plan_sp->GetPrivate();
+ thread_plan_sp->SetPrivate(false);
+
if (m_private_state.GetValue() != eStateStopped)
{
errors.Printf ("RunThreadPlan called while the private state was not stopped.");
@@ -3390,7 +3397,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
// Now mark this plan as private so it doesn't get reported as the stop reason
// after this point.
if (thread_plan_sp)
- thread_plan_sp->SetPrivate (true);
+ thread_plan_sp->SetPrivate (orig_plan_private);
return_value = eExecutionCompleted;
}
else
OpenPOWER on IntegriCloud