diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 7247601b292b..71e67f6ba208 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -292,16 +292,10 @@ public: // Check if we are in Non-Stop mode TargetSP target_sp = execution_context ? execution_context->GetTargetSP() : TargetSP(); - 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; - } + 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(); @@ -532,12 +526,12 @@ protected: return false; } - // If we got a new plan, then set it to be a master plan (User level Plans - // should be master plans so that they can be interruptible). Then resume - // the process. + // If we got a new plan, then set it to be a controlling plan (User level + // Plans should be controlling plans so that they can be interruptible). + // Then resume the process. if (new_plan_sp) { - new_plan_sp->SetIsMasterPlan(true); + new_plan_sp->SetIsControllingPlan(true); new_plan_sp->SetOkayToDiscard(false); if (m_options.m_step_count > 1) { @@ -1027,11 +1021,12 @@ protected: abort_other_plans, &address_list.front(), address_list.size(), m_options.m_stop_others, m_options.m_frame_idx, new_plan_status); if (new_plan_sp) { - // User level plans should be master plans so they can be interrupted + // User level plans should be controlling plans so they can be + // interrupted // (e.g. by hitting a breakpoint) and other plans executed by the // user (stepping around the breakpoint) and then a "continue" will // resume the original plan. - new_plan_sp->SetIsMasterPlan(true); + new_plan_sp->SetIsControllingPlan(true); new_plan_sp->SetOkayToDiscard(false); } else { result.SetError(new_plan_status); @@ -1935,15 +1930,14 @@ public: "process to different formats.", "thread trace export <export-plugin> [<subcommand objects>]") { - for (uint32_t i = 0; true; i++) { - if (const char *plugin_name = - PluginManager::GetTraceExporterPluginNameAtIndex(i)) { - if (ThreadTraceExportCommandCreator command_creator = - PluginManager::GetThreadTraceExportCommandCreatorAtIndex(i)) { - LoadSubCommand(plugin_name, command_creator(interpreter)); - } - } else { - break; + unsigned i = 0; + for (llvm::StringRef plugin_name = + PluginManager::GetTraceExporterPluginNameAtIndex(i++); + !plugin_name.empty(); + plugin_name = PluginManager::GetTraceExporterPluginNameAtIndex(i++)) { + if (ThreadTraceExportCommandCreator command_creator = + PluginManager::GetThreadTraceExportCommandCreatorAtIndex(i)) { + LoadSubCommand(plugin_name, command_creator(interpreter)); } } } @@ -2205,9 +2199,8 @@ public: bool DoExecute(Args &command, CommandReturnObject &result) override { Target &target = m_exe_ctx.GetTargetRef(); - result.GetOutputStream().Printf( - "Trace technology: %s\n", - target.GetTrace()->GetPluginName().AsCString()); + result.GetOutputStream().Format("Trace technology: {0}\n", + target.GetTrace()->GetPluginName()); return CommandObjectIterateOverThreads::DoExecute(command, result); } |