diff options
author | Jim Ingham <jingham@apple.com> | 2020-08-07 14:44:01 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2020-08-07 14:47:31 -0700 |
commit | d3dfd8cec44072302818c34193d898903dbaef8f (patch) | |
tree | a01bcdd2caf8d5cd56537cc8cfe1ac57d2a501c5 /lldb/source/Commands/CommandObjectThread.cpp | |
parent | 71a1f135e4ede2b03f5efb7e18dca1c3db7504ec (diff) | |
download | llvm-d3dfd8cec44072302818c34193d898903dbaef8f.zip llvm-d3dfd8cec44072302818c34193d898903dbaef8f.tar.gz llvm-d3dfd8cec44072302818c34193d898903dbaef8f.tar.bz2 |
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index f0ad179..666c208 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -482,8 +482,16 @@ public: // Check if we are in Non-Stop mode TargetSP target_sp = execution_context ? execution_context->GetTargetSP() : TargetSP(); - if (target_sp && target_sp->GetNonStopModeEnabled()) + if (target_sp && target_sp->GetNonStopModeEnabled()) { + // NonStopMode runs all threads by definition, so when it is on we don't + // need to check the process setting for runs all threads. m_run_mode = eOnlyThisThread; + } else { + ProcessSP process_sp = + execution_context ? execution_context->GetProcessSP() : ProcessSP(); + if (process_sp && process_sp->GetSteppingRunsAllThreads()) + m_run_mode = eAllThreads; + } m_avoid_regexp.clear(); m_step_in_target.clear(); @@ -612,8 +620,7 @@ protected: if (m_options.m_run_mode == eAllThreads) bool_stop_other_threads = false; else if (m_options.m_run_mode == eOnlyDuringStepping) - bool_stop_other_threads = - (m_step_type != eStepTypeOut && m_step_type != eStepTypeScripted); + bool_stop_other_threads = (m_step_type != eStepTypeOut); else bool_stop_other_threads = true; |