Plumb the EvaluateExpressionOptions::{Set,Get}StopOthers through the SB API, and make it work in RunThreadPlan.
Also remove SetStopOthers from the ThreadPlanCallFunction, because if the value you have doesn't match what is in the EvaluateExpressionOptions the plan was passed when created it won't work correctly. llvm-svn: 202464
This commit is contained in:
parent
a51f0f8367
commit
286fb1ef32
|
@ -64,6 +64,12 @@ public:
|
|||
|
||||
void
|
||||
SetTryAllThreads (bool run_others = true);
|
||||
|
||||
bool
|
||||
GetStopOthers() const;
|
||||
|
||||
void
|
||||
SetStopOthers(bool stop_others = true);
|
||||
|
||||
bool
|
||||
GetTrapExceptions () const;
|
||||
|
|
|
@ -52,9 +52,6 @@ public:
|
|||
virtual bool
|
||||
StopOthers ();
|
||||
|
||||
virtual void
|
||||
SetStopOthers (bool new_value);
|
||||
|
||||
virtual lldb::StateType
|
||||
GetPlanRunState ();
|
||||
|
||||
|
|
|
@ -71,6 +71,13 @@ public:
|
|||
void
|
||||
SetTryAllThreads (bool run_others = true);
|
||||
|
||||
bool
|
||||
GetStopOthers () const;
|
||||
|
||||
%feature("docstring", "Sets whether to stop other threads at all while running expressins. If false, TryAllThreads does nothing.") SetTryAllThreads;
|
||||
void
|
||||
SetStopOthers (bool stop_others = true);
|
||||
|
||||
bool
|
||||
GetTrapExceptions () const;
|
||||
|
||||
|
|
|
@ -113,6 +113,18 @@ SBExpressionOptions::SetTryAllThreads (bool run_others)
|
|||
m_opaque_ap->SetTryAllThreads (run_others);
|
||||
}
|
||||
|
||||
bool
|
||||
SBExpressionOptions::GetStopOthers () const
|
||||
{
|
||||
return m_opaque_ap->GetStopOthers ();
|
||||
}
|
||||
|
||||
void
|
||||
SBExpressionOptions::SetStopOthers (bool run_others)
|
||||
{
|
||||
m_opaque_ap->SetStopOthers (run_others);
|
||||
}
|
||||
|
||||
bool
|
||||
SBExpressionOptions::GetTrapExceptions () const
|
||||
{
|
||||
|
|
|
@ -5118,7 +5118,12 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
|
|||
TimeValue final_timeout = one_thread_timeout;
|
||||
|
||||
uint32_t timeout_usec = options.GetTimeoutUsec();
|
||||
if (options.GetTryAllThreads())
|
||||
if (!options.GetStopOthers())
|
||||
{
|
||||
before_first_timeout = false;
|
||||
final_timeout.OffsetWithMicroSeconds(timeout_usec);
|
||||
}
|
||||
else if (options.GetTryAllThreads())
|
||||
{
|
||||
// If we are running all threads then we take half the time to run all threads, bounded by
|
||||
// .25 sec.
|
||||
|
|
|
@ -425,17 +425,6 @@ ThreadPlanCallFunction::StopOthers ()
|
|||
return m_stop_other_threads;
|
||||
}
|
||||
|
||||
void
|
||||
ThreadPlanCallFunction::SetStopOthers (bool new_value)
|
||||
{
|
||||
if (m_subplan_sp)
|
||||
{
|
||||
ThreadPlanRunToAddress *address_plan = static_cast<ThreadPlanRunToAddress *>(m_subplan_sp.get());
|
||||
address_plan->SetStopOthers(new_value);
|
||||
}
|
||||
m_stop_other_threads = new_value;
|
||||
}
|
||||
|
||||
StateType
|
||||
ThreadPlanCallFunction::GetPlanRunState ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue