aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-12 04:51:55 +0000
committerZachary Turner <zturner@google.com>2017-05-12 04:51:55 +0000
commit97206d572797bddc1bba71bb1c18c97f19d69053 (patch)
treefdf21d24485672cf97c800264d135b9d5d2ecdce /lldb/source/Commands/CommandObjectProcess.cpp
parent3086b45a2fae833e8419885e78c598d936cc6429 (diff)
downloadllvm-97206d572797bddc1bba71bb1c18c97f19d69053.zip
llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.gz
llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.bz2
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 557bdee..9fbdd76 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -74,7 +74,7 @@ protected:
} else {
if (process->GetShouldDetach()) {
bool keep_stopped = false;
- Error detach_error(process->Detach(keep_stopped));
+ Status detach_error(process->Detach(keep_stopped));
if (detach_error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
process = nullptr;
@@ -85,7 +85,7 @@ protected:
result.SetStatus(eReturnStatusFailed);
}
} else {
- Error destroy_error(process->Destroy(false));
+ Status destroy_error(process->Destroy(false));
if (destroy_error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
process = nullptr;
@@ -231,7 +231,7 @@ protected:
}
StreamString stream;
- Error error = target->Launch(m_options.launch_info, &stream);
+ Status error = target->Launch(m_options.launch_info, &stream);
if (error.Success()) {
ProcessSP process_sp(target->GetProcessSP());
@@ -338,9 +338,9 @@ public:
~CommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
switch (short_option) {
case 'c':
@@ -470,7 +470,7 @@ protected:
if (target == nullptr) {
// If there isn't a current target create one.
TargetSP new_target_sp;
- Error error;
+ Status error;
error = m_interpreter.GetDebugger().GetTargetList().CreateTarget(
m_interpreter.GetDebugger(), "", "", false,
@@ -603,9 +603,9 @@ protected:
~CommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
switch (short_option) {
case 'i':
@@ -687,7 +687,7 @@ protected:
const uint32_t iohandler_id = process->GetIOHandlerID();
StreamString stream;
- Error error;
+ Status error;
if (synchronous_execution)
error = process->ResumeSynchronous(&stream);
else
@@ -751,9 +751,9 @@ public:
~CommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
switch (short_option) {
@@ -816,7 +816,7 @@ protected:
else
keep_stopped = false;
- Error error(process->Detach(keep_stopped));
+ Status error(process->Detach(keep_stopped));
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
@@ -854,9 +854,9 @@ public:
~CommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
switch (short_option) {
@@ -919,7 +919,7 @@ protected:
if (!m_options.plugin_name.empty())
plugin_name = m_options.plugin_name.c_str();
- Error error;
+ Status error;
Debugger &debugger = m_interpreter.GetDebugger();
PlatformSP platform_sp = m_interpreter.GetPlatform(true);
ProcessSP process_sp = platform_sp->ConnectProcess(
@@ -983,9 +983,9 @@ public:
~CommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
switch (short_option) {
case 'i':
@@ -1033,7 +1033,7 @@ protected:
Process *process = m_exe_ctx.GetProcessPtr();
for (auto &entry : command.entries()) {
- Error error;
+ Status error;
PlatformSP platform = process->GetTarget().GetPlatform();
llvm::StringRef image_path = entry.ref;
uint32_t image_token = LLDB_INVALID_IMAGE_TOKEN;
@@ -1103,7 +1103,7 @@ protected:
result.SetStatus(eReturnStatusFailed);
break;
} else {
- Error error(process->GetTarget().GetPlatform()->UnloadImage(
+ Status error(process->GetTarget().GetPlatform()->UnloadImage(
process, image_token));
if (error.Success()) {
result.AppendMessageWithFormat(
@@ -1169,7 +1169,7 @@ protected:
command.GetArgumentAtIndex(0));
result.SetStatus(eReturnStatusFailed);
} else {
- Error error(process->Signal(signo));
+ Status error(process->Signal(signo));
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
@@ -1215,7 +1215,7 @@ protected:
if (command.GetArgumentCount() == 0) {
bool clear_thread_plans = true;
- Error error(process->Halt(clear_thread_plans));
+ Status error(process->Halt(clear_thread_plans));
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
@@ -1258,7 +1258,7 @@ protected:
}
if (command.GetArgumentCount() == 0) {
- Error error(process->Destroy(true));
+ Status error(process->Destroy(true));
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
@@ -1298,7 +1298,7 @@ protected:
if (process_sp) {
if (command.GetArgumentCount() == 1) {
FileSpec output_file(command.GetArgumentAtIndex(0), false);
- Error error = PluginManager::SaveCore(process_sp, output_file);
+ Status error = PluginManager::SaveCore(process_sp, output_file);
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
@@ -1377,9 +1377,9 @@ public:
~CommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
switch (short_option) {