aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThreadUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectThreadUtil.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThreadUtil.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/lldb/source/Commands/CommandObjectThreadUtil.cpp b/lldb/source/Commands/CommandObjectThreadUtil.cpp
index 504d5fa..d7fa419 100644
--- a/lldb/source/Commands/CommandObjectThreadUtil.cpp
+++ b/lldb/source/Commands/CommandObjectThreadUtil.cpp
@@ -34,16 +34,16 @@ CommandObjectMultipleThreads::CommandObjectMultipleThreads(
m_arguments.push_back({thread_arg});
}
-bool CommandObjectIterateOverThreads::DoExecute(Args &command,
+void CommandObjectIterateOverThreads::DoExecute(Args &command,
CommandReturnObject &result) {
result.SetStatus(m_success_return);
bool all_threads = false;
if (command.GetArgumentCount() == 0) {
Thread *thread = m_exe_ctx.GetThreadPtr();
- if (!thread || !HandleOneThread(thread->GetID(), result))
- return false;
- return result.Succeeded();
+ if (thread)
+ HandleOneThread(thread->GetID(), result);
+ return;
} else if (command.GetArgumentCount() == 1) {
all_threads = ::strcmp(command.GetArgumentAtIndex(0), "all") == 0;
m_unique_stacks = ::strcmp(command.GetArgumentAtIndex(0), "unique") == 0;
@@ -71,7 +71,7 @@ bool CommandObjectIterateOverThreads::DoExecute(Args &command,
if (!llvm::to_integer(command.GetArgumentAtIndex(i), thread_idx)) {
result.AppendErrorWithFormat("invalid thread specification: \"%s\"\n",
command.GetArgumentAtIndex(i));
- return false;
+ return;
}
ThreadSP thread =
@@ -80,7 +80,7 @@ bool CommandObjectIterateOverThreads::DoExecute(Args &command,
if (!thread) {
result.AppendErrorWithFormat("no thread with index: \"%s\"\n",
command.GetArgumentAtIndex(i));
- return false;
+ return;
}
tids.push_back(thread->GetID());
@@ -92,7 +92,7 @@ bool CommandObjectIterateOverThreads::DoExecute(Args &command,
std::set<UniqueStack> unique_stacks;
for (const lldb::tid_t &tid : tids) {
if (!BucketThread(tid, unique_stacks, result)) {
- return false;
+ return;
}
}
@@ -114,7 +114,7 @@ bool CommandObjectIterateOverThreads::DoExecute(Args &command,
ThreadSP thread = process->GetThreadList().FindThreadByIndexID(
representative_thread_id);
if (!HandleOneThread(thread->GetID(), result)) {
- return false;
+ return;
}
}
} else {
@@ -124,12 +124,11 @@ bool CommandObjectIterateOverThreads::DoExecute(Args &command,
result.AppendMessage("");
if (!HandleOneThread(tid, result))
- return false;
+ return;
++idx;
}
}
- return result.Succeeded();
}
bool CommandObjectIterateOverThreads::BucketThread(
@@ -167,7 +166,7 @@ bool CommandObjectIterateOverThreads::BucketThread(
return true;
}
-bool CommandObjectMultipleThreads::DoExecute(Args &command,
+void CommandObjectMultipleThreads::DoExecute(Args &command,
CommandReturnObject &result) {
Process &process = m_exe_ctx.GetProcessRef();
@@ -191,7 +190,7 @@ bool CommandObjectMultipleThreads::DoExecute(Args &command,
if (!llvm::to_integer(command.GetArgumentAtIndex(i), thread_idx)) {
result.AppendErrorWithFormat("invalid thread specification: \"%s\"\n",
command.GetArgumentAtIndex(i));
- return false;
+ return;
}
ThreadSP thread = process.GetThreadList().FindThreadByIndexID(thread_idx);
@@ -199,12 +198,12 @@ bool CommandObjectMultipleThreads::DoExecute(Args &command,
if (!thread) {
result.AppendErrorWithFormat("no thread with index: \"%s\"\n",
command.GetArgumentAtIndex(i));
- return false;
+ return;
}
tids.push_back(thread->GetID());
}
}
- return DoExecuteOnThreads(command, result, tids);
+ DoExecuteOnThreads(command, result, tids);
}