aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-10-30 15:26:19 -0700
committerAdrian Prantl <aprantl@apple.com>2019-10-30 16:03:00 -0700
commita925974bf166a83cfd45b0ca89c5c65d17f275cc (patch)
treee08143032d4c9afac1ed92aca0c34d6792ef24da /lldb/source/Commands/CommandObjectThread.cpp
parent17b64e36e90ad05a32a99b9f5784b55310cc10e8 (diff)
downloadllvm-a925974bf166a83cfd45b0ca89c5c65d17f275cc.zip
llvm-a925974bf166a83cfd45b0ca89c5c65d17f275cc.tar.gz
llvm-a925974bf166a83cfd45b0ca89c5c65d17f275cc.tar.bz2
Run clang-format on lldb/source/Commands (NFC)
These files had a lot of whitespace errors in them which was a constant source of merge conflicts downstream.
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp65
1 files changed, 30 insertions, 35 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index d498418..c93bd9d 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -339,8 +339,7 @@ protected:
const bool stop_format = false;
if (ext_thread_sp->GetStatus(strm, m_options.m_start,
m_options.m_count,
- num_frames_with_source,
- stop_format)) {
+ num_frames_with_source, stop_format)) {
DoExtendedBacktrace(ext_thread_sp.get(), result);
}
}
@@ -393,7 +392,7 @@ static constexpr OptionEnumValueElement g_tri_running_mode[] = {
{eOnlyThisThread, "this-thread", "Run only this thread"},
{eAllThreads, "all-threads", "Run all threads"},
{eOnlyDuringStepping, "while-stepping",
- "Run only this thread while stepping"} };
+ "Run only this thread while stepping"}};
static constexpr OptionEnumValues TriRunningModes() {
return OptionEnumValues(g_tri_running_mode);
@@ -419,8 +418,8 @@ public:
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override {
Status error;
- const int short_option
- = g_thread_step_scope_options[option_idx].short_option;
+ const int short_option =
+ g_thread_step_scope_options[option_idx].short_option;
switch (short_option) {
case 'a': {
@@ -428,11 +427,10 @@ public:
bool avoid_no_debug =
OptionArgParser::ToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat(
- "invalid boolean value for option '%c'", short_option);
+ error.SetErrorStringWithFormat("invalid boolean value for option '%c'",
+ short_option);
else {
- m_step_in_avoid_no_debug =
- avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
+ m_step_in_avoid_no_debug = avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
}
} break;
@@ -441,11 +439,10 @@ public:
bool avoid_no_debug =
OptionArgParser::ToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat(
- "invalid boolean value for option '%c'", short_option);
+ error.SetErrorStringWithFormat("invalid boolean value for option '%c'",
+ short_option);
else {
- m_step_out_avoid_no_debug =
- avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
+ m_step_out_avoid_no_debug = avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
}
} break;
@@ -518,7 +515,6 @@ public:
class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
public:
-
CommandObjectThreadStepWithTypeAndScope(CommandInterpreter &interpreter,
const char *name, const char *help,
const char *syntax,
@@ -544,10 +540,9 @@ public:
// Push the data for the first argument into the m_arguments vector.
m_arguments.push_back(arg);
-
+
if (step_type == eStepTypeScripted) {
- m_all_options.Append(&m_class_options,
- LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ m_all_options.Append(&m_class_options, LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
LLDB_OPT_SET_1);
}
m_all_options.Append(&m_options);
@@ -556,9 +551,7 @@ public:
~CommandObjectThreadStepWithTypeAndScope() override = default;
- Options *GetOptions() override {
- return &m_all_options;
- }
+ Options *GetOptions() override { return &m_all_options; }
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
@@ -722,9 +715,9 @@ protected:
m_options.m_step_out_avoid_no_debug);
} else if (m_step_type == eStepTypeScripted) {
new_plan_sp = thread->QueueThreadPlanForStepScripted(
- abort_other_plans, m_class_options.GetName().c_str(),
- m_class_options.GetStructuredData(),
- bool_stop_other_threads, new_plan_status);
+ abort_other_plans, m_class_options.GetName().c_str(),
+ m_class_options.GetStructuredData(), bool_stop_other_threads,
+ new_plan_status);
} else {
result.AppendError("step type is not supported");
result.SetStatus(eReturnStatusFailed);
@@ -971,7 +964,7 @@ public:
static constexpr OptionEnumValueElement g_duo_running_mode[] = {
{eOnlyThisThread, "this-thread", "Run only this thread"},
- {eAllThreads, "all-threads", "Run all threads"} };
+ {eAllThreads, "all-threads", "Run all threads"}};
static constexpr OptionEnumValues DuoRunningModes() {
return OptionEnumValues(g_duo_running_mode);
@@ -1065,7 +1058,8 @@ public:
"Continue until a line number or address is reached by the "
"current or specified thread. Stops when returning from "
"the current function as a safety measure. "
- "The target line number(s) are given as arguments, and if more than one"
+ "The target line number(s) are given as arguments, and if more "
+ "than one"
" is provided, stepping will stop when the first one is hit.",
nullptr,
eCommandRequiresThread | eCommandTryTargetAPILock |
@@ -1432,9 +1426,10 @@ public:
CommandObjectThreadInfo(CommandInterpreter &interpreter)
: CommandObjectIterateOverThreads(
- interpreter, "thread info", "Show an extended summary of one or "
- "more threads. Defaults to the "
- "current thread.",
+ interpreter, "thread info",
+ "Show an extended summary of one or "
+ "more threads. Defaults to the "
+ "current thread.",
"thread info",
eCommandRequiresProcess | eCommandTryTargetAPILock |
eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
@@ -1476,7 +1471,7 @@ public:
// CommandObjectThreadException
class CommandObjectThreadException : public CommandObjectIterateOverThreads {
- public:
+public:
CommandObjectThreadException(CommandInterpreter &interpreter)
: CommandObjectIterateOverThreads(
interpreter, "thread exception",
@@ -2008,9 +2003,10 @@ public:
CommandObjectMultiwordThread::CommandObjectMultiwordThread(
CommandInterpreter &interpreter)
- : CommandObjectMultiword(interpreter, "thread", "Commands for operating on "
- "one or more threads in "
- "the current process.",
+ : CommandObjectMultiword(interpreter, "thread",
+ "Commands for operating on "
+ "one or more threads in "
+ "the current process.",
"thread <subcommand> [<subcommand-options>]") {
LoadSubCommand("backtrace", CommandObjectSP(new CommandObjectThreadBacktrace(
interpreter)));
@@ -2028,9 +2024,8 @@ CommandObjectMultiwordThread::CommandObjectMultiwordThread(
CommandObjectSP(new CommandObjectThreadUntil(interpreter)));
LoadSubCommand("info",
CommandObjectSP(new CommandObjectThreadInfo(interpreter)));
- LoadSubCommand(
- "exception",
- CommandObjectSP(new CommandObjectThreadException(interpreter)));
+ LoadSubCommand("exception", CommandObjectSP(new CommandObjectThreadException(
+ interpreter)));
LoadSubCommand("step-in",
CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
interpreter, "thread step-in",