Add a setting to force stepping to always run all threads.

Also allow ScriptedThreadPlans to set & get their StopOthers
state.

<rdar://problem/64229484>

Differential Revision: https://reviews.llvm.org/D85265
This commit is contained in:
Jim Ingham
2020-08-07 14:44:01 -07:00
parent 71a1f135e4
commit d3dfd8cec4
12 changed files with 136 additions and 16 deletions

View File

@@ -196,6 +196,23 @@ bool SBThreadPlan::IsValid() {
return false;
}
bool SBThreadPlan::GetStopOthers() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBThreadPlan, GetStopOthers);
ThreadPlanSP thread_plan_sp(GetSP());
if (thread_plan_sp)
return thread_plan_sp->StopOthers();
return false;
}
void SBThreadPlan::SetStopOthers(bool stop_others) {
LLDB_RECORD_METHOD(void, SBThreadPlan, SetStopOthers, (bool), stop_others);
ThreadPlanSP thread_plan_sp(GetSP());
if (thread_plan_sp)
thread_plan_sp->SetStopOthers(stop_others);
}
// This section allows an SBThreadPlan to push another of the common types of
// plans...
//
@@ -463,6 +480,8 @@ void RegisterMethods<SBThreadPlan>(Registry &R) {
LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanComplete, ());
LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsPlanStale, ());
LLDB_REGISTER_METHOD(bool, SBThreadPlan, IsValid, ());
LLDB_REGISTER_METHOD(void, SBThreadPlan, SetStopOthers, (bool));
LLDB_REGISTER_METHOD(bool, SBThreadPlan, GetStopOthers, ());
LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
QueueThreadPlanForStepOverRange,
(lldb::SBAddress &, lldb::addr_t));