[Lldb-commits] [lldb] r131498 - in /lldb/trunk/source: Expression/ClangUserExpression.cpp Target/Process.cpp
Jim Ingham
jingham at apple.com
Tue May 17 15:24:54 PDT 2011
Author: jingham
Date: Tue May 17 17:24:54 2011
New Revision: 131498
URL: http://llvm.org/viewvc/llvm-project?rev=131498&view=rev
Log:
RunThreadPlan should set the plan to "not private" since it needs that,
and then reset it to the original value when done.
Modified:
lldb/trunk/source/Expression/ClangUserExpression.cpp
lldb/trunk/source/Target/Process.cpp
Modified: lldb/trunk/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangUserExpression.cpp?rev=131498&r1=131497&r2=131498&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangUserExpression.cpp Tue May 17 17:24:54 2011
@@ -508,7 +508,7 @@
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;
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=131498&r1=131497&r2=131498&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue May 17 17:24:54 2011
@@ -3226,6 +3226,13 @@
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 @@
// 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
More information about the lldb-commits
mailing list