summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
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
parent3086b45a2fae833e8419885e78c598d936cc6429 (diff)
downloadbcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.gz
bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.zip
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')
-rw-r--r--lldb/source/Commands/CommandObjectArgs.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectArgs.h4
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp64
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp12
-rw-r--r--lldb/source/Commands/CommandObjectBugreport.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp54
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.cpp8
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.h6
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp18
-rw-r--r--lldb/source/Commands/CommandObjectExpression.h4
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectHelp.h6
-rw-r--r--lldb/source/Commands/CommandObjectLog.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp42
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp69
-rw-r--r--lldb/source/Commands/CommandObjectPlugin.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp62
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp8
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp24
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp12
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp44
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp68
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp92
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp28
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp6
25 files changed, 330 insertions, 329 deletions
diff --git a/lldb/source/Commands/CommandObjectArgs.cpp b/lldb/source/Commands/CommandObjectArgs.cpp
index 8042aa9d81d..92c2107dc33 100644
--- a/lldb/source/Commands/CommandObjectArgs.cpp
+++ b/lldb/source/Commands/CommandObjectArgs.cpp
@@ -55,10 +55,10 @@ CommandObjectArgs::CommandOptions::CommandOptions(
CommandObjectArgs::CommandOptions::~CommandOptions() = default;
-Error CommandObjectArgs::CommandOptions::SetOptionValue(
+Status CommandObjectArgs::CommandOptions::SetOptionValue(
uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) {
- Error error;
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
error.SetErrorStringWithFormat("invalid short option character '%c'",
diff --git a/lldb/source/Commands/CommandObjectArgs.h b/lldb/source/Commands/CommandObjectArgs.h
index a4b3f9fed0e..aa7d2411adc 100644
--- a/lldb/source/Commands/CommandObjectArgs.h
+++ b/lldb/source/Commands/CommandObjectArgs.h
@@ -27,8 +27,8 @@ public:
~CommandOptions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index d77cf55b60e..266864d1a1f 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -178,9 +178,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) {
@@ -662,7 +662,7 @@ protected:
.get();
} break;
case eSetTypeException: {
- Error precond_error;
+ Status precond_error;
bp = target
->CreateExceptionBreakpoint(
m_options.m_exception_language, m_options.m_catch_bp,
@@ -705,7 +705,7 @@ protected:
bp->GetOptions()->SetCondition(m_options.m_condition.c_str());
if (!m_options.m_breakpoint_names.empty()) {
- Error name_error;
+ Status name_error;
for (auto name : m_options.m_breakpoint_names) {
bp->AddName(name.c_str(), name_error);
if (name_error.Fail()) {
@@ -844,9 +844,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) {
@@ -1305,9 +1305,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) {
@@ -1452,9 +1452,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) {
@@ -1611,9 +1611,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) {
@@ -1751,9 +1751,9 @@ public:
return llvm::makeArrayRef(g_breakpoint_name_options);
}
- 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 = g_breakpoint_name_options[option_idx].short_option;
switch (short_option) {
@@ -1864,8 +1864,8 @@ protected:
lldb::break_id_t bp_id =
valid_bp_ids.GetBreakpointIDAtIndex(index).GetBreakpointID();
BreakpointSP bp_sp = breakpoints.FindBreakpointByID(bp_id);
- Error error; // We don't need to check the error here, since the option
- // parser checked it...
+ Status error; // We don't need to check the error here, since the option
+ // parser checked it...
bp_sp->AddName(m_name_options.m_name.GetCurrentValue(), error);
}
}
@@ -2093,9 +2093,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) {
@@ -2103,7 +2103,7 @@ public:
m_filename.assign(option_arg);
break;
case 'N': {
- Error name_error;
+ Status name_error;
if (!BreakpointID::StringIsBreakpointName(llvm::StringRef(option_arg),
name_error)) {
error.SetErrorStringWithFormat("Invalid breakpoint name: %s",
@@ -2150,8 +2150,8 @@ protected:
FileSpec input_spec(m_options.m_filename, true);
BreakpointIDList new_bps;
- Error error = target->CreateBreakpointsFromFile(input_spec,
- m_options.m_names, new_bps);
+ Status error = target->CreateBreakpointsFromFile(
+ input_spec, m_options.m_names, new_bps);
if (!error.Success()) {
result.AppendError(error.AsCString());
@@ -2223,9 +2223,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) {
@@ -2281,7 +2281,7 @@ protected:
return false;
}
}
- Error error = target->SerializeBreakpointsToFile(
+ Status error = target->SerializeBreakpointsToFile(
FileSpec(m_options.m_filename, true), valid_bp_ids, m_options.m_append);
if (!error.Success()) {
result.AppendErrorWithFormat("error serializing breakpoints: %s.",
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 73c0c314533..de491195310 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -281,9 +281,9 @@ are no syntax errors may indicate that a function was declared but never called.
~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) {
@@ -511,9 +511,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) {
diff --git a/lldb/source/Commands/CommandObjectBugreport.cpp b/lldb/source/Commands/CommandObjectBugreport.cpp
index 04050e3a669..7ba8ab945ea 100644
--- a/lldb/source/Commands/CommandObjectBugreport.cpp
+++ b/lldb/source/Commands/CommandObjectBugreport.cpp
@@ -84,7 +84,7 @@ protected:
open_options |= File::eOpenOptionTruncate;
StreamFileSP outfile_stream = std::make_shared<StreamFile>();
- Error error = outfile_stream->GetFile().Open(path, open_options);
+ Status error = outfile_stream->GetFile().Open(path, open_options);
if (error.Fail()) {
result.AppendErrorWithFormat("Failed to open file '%s' for %s: %s\n",
path, append ? "append" : "write",
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index e39c0330b65..c9d71a65754 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -71,9 +71,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) {
@@ -261,9 +261,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) {
@@ -371,9 +371,9 @@ protected:
return llvm::makeArrayRef(g_alias_options);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = GetDefinitions()[option_idx].short_option;
std::string option_str(option_value);
@@ -579,7 +579,7 @@ protected:
if (!ParseOptions(args, result))
return false;
- Error error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
+ Status error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
@@ -1030,7 +1030,7 @@ protected:
bool check_only = false;
for (size_t i = 0; i < num_lines; ++i) {
llvm::StringRef bytes_strref(lines[i]);
- Error error = AppendRegexSubstitution(bytes_strref, check_only);
+ Status error = AppendRegexSubstitution(bytes_strref, check_only);
if (error.Fail()) {
if (!m_interpreter.GetDebugger()
.GetCommandInterpreter()
@@ -1058,7 +1058,7 @@ protected:
return false;
}
- Error error;
+ Status error;
auto name = command[0].ref;
m_regex_cmd_ap = llvm::make_unique<CommandObjectRegexCommand>(
m_interpreter, name, m_options.GetHelp(), m_options.GetSyntax(), 10, 0,
@@ -1101,9 +1101,9 @@ protected:
return result.Succeeded();
}
- Error AppendRegexSubstitution(const llvm::StringRef &regex_sed,
- bool check_only) {
- Error error;
+ Status AppendRegexSubstitution(const llvm::StringRef &regex_sed,
+ bool check_only) {
+ Status error;
if (!m_regex_cmd_ap) {
error.SetErrorStringWithFormat(
@@ -1215,9 +1215,9 @@ private:
~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) {
@@ -1311,7 +1311,7 @@ protected:
CommandReturnObject &result) override {
ScriptInterpreter *scripter = m_interpreter.GetScriptInterpreter();
- Error error;
+ Status error;
result.SetStatus(eReturnStatusInvalid);
@@ -1400,7 +1400,7 @@ protected:
CommandReturnObject &result) override {
ScriptInterpreter *scripter = m_interpreter.GetScriptInterpreter();
- Error error;
+ Status error;
result.SetStatus(eReturnStatusInvalid);
@@ -1487,9 +1487,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) {
@@ -1534,7 +1534,7 @@ protected:
}
for (auto &entry : command.entries()) {
- Error error;
+ Status error;
const bool init_session = true;
// FIXME: this is necessary because CommandObject::CheckRequirements()
@@ -1619,9 +1619,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) {
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 4496462476b..5d0f2417f99 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -71,10 +71,10 @@ CommandObjectDisassemble::CommandOptions::CommandOptions()
CommandObjectDisassemble::CommandOptions::~CommandOptions() = default;
-Error CommandObjectDisassemble::CommandOptions::SetOptionValue(
+Status CommandObjectDisassemble::CommandOptions::SetOptionValue(
uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) {
- Error error;
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
@@ -224,11 +224,11 @@ void CommandObjectDisassemble::CommandOptions::OptionParsingStarting(
some_location_specified = false;
}
-Error CommandObjectDisassemble::CommandOptions::OptionParsingFinished(
+Status CommandObjectDisassemble::CommandOptions::OptionParsingFinished(
ExecutionContext *execution_context) {
if (!some_location_specified)
current_function = true;
- return Error();
+ return Status();
}
llvm::ArrayRef<OptionDefinition>
diff --git a/lldb/source/Commands/CommandObjectDisassemble.h b/lldb/source/Commands/CommandObjectDisassemble.h
index db89aa24d6a..8ca390056dd 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.h
+++ b/lldb/source/Commands/CommandObjectDisassemble.h
@@ -32,8 +32,8 @@ public:
~CommandOptions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override;
void OptionParsingStarting(ExecutionContext *execution_context) override;
@@ -49,7 +49,7 @@ public:
return flavor_string.c_str();
}
- Error OptionParsingFinished(ExecutionContext *execution_context) override;
+ Status OptionParsingFinished(ExecutionContext *execution_context) override;
bool show_mixed; // Show mixed source/assembly
bool show_bytes;
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 8a0afce741e..b6e0016c88e 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -69,10 +69,10 @@ static OptionDefinition g_expression_options[] = {
// clang-format on
};
-Error CommandObjectExpression::CommandOptions::SetOptionValue(
+Status CommandObjectExpression::CommandOptions::SetOptionValue(
uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) {
- Error error;
+ Status error;
const int short_option = GetDefinitions()[option_idx].short_option;
@@ -295,15 +295,15 @@ CommandObjectExpression::~CommandObjectExpression() = default;
Options *CommandObjectExpression::GetOptions() { return &m_option_group; }
-static lldb_private::Error
+static lldb_private::Status
CanBeUsedForElementCountPrinting(ValueObject &valobj) {
CompilerType type(valobj.GetCompilerType());
CompilerType pointee;
if (!type.IsPointerType(&pointee))
- return Error("as it does not refer to a pointer");
+ return Status("as it does not refer to a pointer");
if (pointee.IsVoidType())
- return Error("as it refers to a pointer to void");
- return Error();
+ return Status("as it refers to a pointer to void");
+ return Status();
}
bool CommandObjectExpression::EvaluateExpression(const char *expr,
@@ -384,7 +384,7 @@ bool CommandObjectExpression::EvaluateExpression(const char *expr,
result_valobj_sp->SetFormat(format);
if (m_varobj_options.elem_count > 0) {
- Error error(CanBeUsedForElementCountPrinting(*result_valobj_sp));
+ Status error(CanBeUsedForElementCountPrinting(*result_valobj_sp));
if (error.Fail()) {
result->AppendErrorWithFormat(
"expression cannot be used with --element-count %s\n",
@@ -533,7 +533,7 @@ bool CommandObjectExpression::DoExecute(const char *command,
if (!ParseOptions(args, result))
return false;
- Error error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
+ Status error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
@@ -564,7 +564,7 @@ bool CommandObjectExpression::DoExecute(const char *command,
// interpreter,
// so just push one
bool initialize = false;
- Error repl_error;
+ Status repl_error;
REPLSP repl_sp(target->GetREPL(
repl_error, m_command_options.language, nullptr, false));
diff --git a/lldb/source/Commands/CommandObjectExpression.h b/lldb/source/Commands/CommandObjectExpression.h
index 7c21adcc26f..0cf2a7263d5 100644
--- a/lldb/source/Commands/CommandObjectExpression.h
+++ b/lldb/source/Commands/CommandObjectExpression.h
@@ -34,8 +34,8 @@ public:
llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
void OptionParsingStarting(ExecutionContext *execution_context) override;
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 7e81f5f9414..8b981a93ad7 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -77,9 +77,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 'r':
@@ -263,9 +263,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 'r':
@@ -604,7 +604,7 @@ protected:
} else // No regex, either exact variable names or variable
// expressions.
{
- Error error;
+ Status error;
uint32_t expr_path_options =
StackFrame::eExpressionPathOptionCheckPtrVsMember |
StackFrame::eExpressionPathOptionsAllowDirectIVarAccess |
diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h
index cd9006619bc..f1f87f8e63c 100644
--- a/lldb/source/Commands/CommandObjectHelp.h
+++ b/lldb/source/Commands/CommandObjectHelp.h
@@ -46,9 +46,9 @@ public:
~CommandOptions() override {}
- 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) {
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp
index 2099310d32c..e545d567972 100644
--- a/lldb/source/Commands/CommandObjectLog.cpp
+++ b/lldb/source/Commands/CommandObjectLog.cpp
@@ -93,9 +93,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) {
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 1679614fe3f..8f4c186a8d6 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -74,9 +74,9 @@ public:
return llvm::makeArrayRef(g_read_memory_options);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = g_read_memory_options[option_idx].short_option;
switch (short_option) {
@@ -120,8 +120,8 @@ public:
m_offset.Clear();
}
- Error FinalizeSettings(Target *target, OptionGroupFormat &format_options) {
- Error error;
+ Status FinalizeSettings(Target *target, OptionGroupFormat &format_options) {
+ Status error;
OptionValueUInt64 &byte_size_value = format_options.GetByteSizeValue();
OptionValueUInt64 &count_value = format_options.GetCountValue();
const bool byte_size_option_set = byte_size_value.OptionWasSet();
@@ -378,7 +378,7 @@ protected:
}
CompilerType clang_ast_type;
- Error error;
+ Status error;
const char *view_as_type_cstr =
m_memory_options.m_view_as_type.GetCurrentValue();
@@ -716,7 +716,7 @@ protected:
while (item_count < count) {
std::string buffer;
buffer.resize(item_byte_size + 1, 0);
- Error error;
+ Status error;
size_t read = target->ReadCStringFromMemory(data_addr, &buffer[0],
item_byte_size + 1, error);
if (error.Fail()) {
@@ -909,9 +909,9 @@ public:
return llvm::makeArrayRef(g_memory_find_option_table);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option =
g_memory_find_option_table[option_idx].short_option;
@@ -1008,7 +1008,7 @@ protected:
return 0;
uint8_t retval = 0;
- Error error;
+ Status error;
if (0 ==
m_process_sp->ReadMemory(m_base_addr + offset, &retval, 1, error)) {
m_is_valid = false;
@@ -1035,7 +1035,7 @@ protected:
return false;
}
- Error error;
+ Status error;
lldb::addr_t low_addr = Args::StringToAddress(&m_exe_ctx, command[0].ref,
LLDB_INVALID_ADDRESS, &error);
if (low_addr == LLDB_INVALID_ADDRESS || error.Fail()) {
@@ -1202,9 +1202,9 @@ public:
return llvm::makeArrayRef(g_memory_write_option_table);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option =
g_memory_write_option_table[option_idx].short_option;
@@ -1344,7 +1344,7 @@ protected:
OptionValueUInt64 &byte_size_value = m_format_options.GetByteSizeValue();
size_t item_byte_size = byte_size_value.GetCurrentValue();
- Error error;
+ Status error;
lldb::addr_t addr = Args::StringToAddress(&m_exe_ctx, command[0].ref,
LLDB_INVALID_ADDRESS, &error);
@@ -1365,7 +1365,7 @@ protected:
if (data_sp) {
length = data_sp->GetByteSize();
if (length > 0) {
- Error error;
+ Status error;
size_t bytes_written =
process->WriteMemory(addr, data_sp->GetBytes(), length, error);
@@ -1506,7 +1506,7 @@ protected:
// Include the NULL for C strings...
if (m_format_options.GetFormat() == eFormatCString)
++len;
- Error error;
+ Status error;
if (process->WriteMemory(addr, entry.c_str(), len, error) == len) {
addr += len;
} else {
@@ -1574,7 +1574,7 @@ protected:
}
if (!buffer.GetString().empty()) {
- Error error;
+ Status error;
if (process->WriteMemory(addr, buffer.GetString().data(),
buffer.GetString().size(),
error) == buffer.GetString().size())
@@ -1641,7 +1641,7 @@ protected:
return false;
}
- Error error;
+ Status error;
lldb::addr_t addr = Args::StringToAddress(&m_exe_ctx, command[0].ref,
LLDB_INVALID_ADDRESS, &error);
@@ -1699,7 +1699,7 @@ protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
ProcessSP process_sp = m_exe_ctx.GetProcessSP();
if (process_sp) {
- Error error;
+ Status error;
lldb::addr_t load_addr = m_prev_end_addr;
m_prev_end_addr = LLDB_INVALID_ADDRESS;
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index 62ea683e6e0..5fa851f584a 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -85,10 +85,10 @@ public:
~OptionPermissions() override = default;
- lldb_private::Error
+ lldb_private::Status
SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override {
- Error error;
+ Status error;
char short_option = (char)GetDefinitions()[option_idx].short_option;
switch (short_option) {
case 'v': {
@@ -200,7 +200,7 @@ protected:
if (platform_name && platform_name[0]) {
const bool select = true;
m_platform_options.SetPlatformName(platform_name);
- Error error;
+ Status error;
ArchSpec platform_arch;
PlatformSP platform_sp(m_platform_options.CreatePlatformWithOptions(
m_interpreter, ArchSpec(), select, error, platform_arch));
@@ -329,7 +329,7 @@ protected:
PlatformSP platform_sp(
m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
- Error error(platform_sp->ConnectRemote(args));
+ Status error(platform_sp->ConnectRemote(args));
if (error.Success()) {
platform_sp->GetStatus(ostrm);
result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -382,7 +382,7 @@ protected:
m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
if (args.GetArgumentCount() == 0) {
- Error error;
+ Status error;
if (platform_sp->IsConnected()) {
// Cache the instance name if there is one since we are
@@ -498,7 +498,8 @@ public:
else
mode = lldb::eFilePermissionsUserRWX | lldb::eFilePermissionsGroupRWX |
lldb::eFilePermissionsWorldRX;
- Error error = platform_sp->MakeDirectory(FileSpec{cmd_line, false}, mode);
+ Status error =
+ platform_sp->MakeDirectory(FileSpec{cmd_line, false}, mode);
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishResult);
} else {
@@ -539,7 +540,7 @@ public:
PlatformSP platform_sp(
m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
- Error error;
+ Status error;
std::string cmd_line;
args.GetCommandString(cmd_line);
mode_t perms;
@@ -599,7 +600,7 @@ public:
args.GetCommandString(cmd_line);
const lldb::user_id_t fd =
StringConvert::ToUInt64(cmd_line.c_str(), UINT64_MAX);
- Error error;
+ Status error;
bool success = platform_sp->CloseFile(fd, error);
if (success) {
result.AppendMessageWithFormat("file %" PRIu64 " closed.\n", fd);
@@ -646,7 +647,7 @@ public:
const lldb::user_id_t fd =
StringConvert::ToUInt64(cmd_line.c_str(), UINT64_MAX);
std::string buffer(m_options.m_count, 0);
- Error error;
+ Status error;
uint32_t retcode = platform_sp->ReadFile(
fd, m_options.m_offset, &buffer[0], m_options.m_count, error);
result.AppendMessageWithFormat("Return = %d\n", retcode);
@@ -668,9 +669,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;
char short_option = (char)m_getopt_table[option_idx].val;
switch (short_option) {
@@ -738,7 +739,7 @@ public:
if (platform_sp) {
std::string cmd_line;
args.GetCommandString(cmd_line);
- Error error;
+ Status error;
const lldb::user_id_t fd =
StringConvert::ToUInt64(cmd_line.c_str(), UINT64_MAX);
uint32_t retcode =
@@ -762,9 +763,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;
char short_option = (char)m_getopt_table[option_idx].val;
switch (short_option) {
@@ -889,8 +890,8 @@ public:
if (platform_sp) {
const char *remote_file_path = args.GetArgumentAtIndex(0);
const char *local_file_path = args.GetArgumentAtIndex(1);
- Error error = platform_sp->GetFile(FileSpec(remote_file_path, false),
- FileSpec(local_file_path, false));
+ Status error = platform_sp->GetFile(FileSpec(remote_file_path, false),
+ FileSpec(local_file_path, false));
if (error.Success()) {
result.AppendMessageWithFormat(
"successfully get-file from %s (remote) to %s (host)\n",
@@ -999,7 +1000,7 @@ public:
PlatformSP platform_sp(
m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
- Error error(platform_sp->PutFile(src_fs, dst_fs));
+ Status error(platform_sp->PutFile(src_fs, dst_fs));
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishNoResult);
} else {
@@ -1043,7 +1044,7 @@ protected:
}
if (platform_sp) {
- Error error;
+ Status error;
const size_t argc = args.GetArgumentCount();
Target *target = m_exe_ctx.GetTargetPtr();
Module *exe_module = target->GetExecutableModulePointer();
@@ -1153,7 +1154,7 @@ protected:
}
if (platform_sp) {
- Error error;
+ Status error;
if (args.GetArgumentCount() == 0) {
if (platform_sp) {
Stream &ostrm = result.GetOutputStream();
@@ -1271,9 +1272,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;
bool success = false;
@@ -1449,7 +1450,7 @@ protected:
if (platform_sp) {
const size_t argc = args.GetArgumentCount();
if (argc > 0) {
- Error error;
+ Status error;
if (platform_sp->IsConnected()) {
Stream &ostrm = result.GetOutputStream();
@@ -1515,9 +1516,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;
char short_option = (char)m_getopt_table[option_idx].val;
switch (short_option) {
case 'p': {
@@ -1624,7 +1625,7 @@ public:
PlatformSP platform_sp(
m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
- Error err;
+ Status err;
ProcessSP remote_process_sp = platform_sp->Attach(
m_options.attach_info, m_interpreter.GetDebugger(), nullptr, err);
if (err.Fail()) {
@@ -1700,9 +1701,9 @@ public:
return llvm::makeArrayRef(g_platform_shell_options);
}
- 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 char short_option = (char)GetDefinitions()[option_idx].short_option;
@@ -1782,7 +1783,7 @@ public:
PlatformSP platform_sp(
m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
- Error error;
+ Status error;
if (platform_sp) {
FileSpec working_dir{};
std::string output;
@@ -1861,7 +1862,7 @@ public:
return false;
}
- Error error = platform_sp->Install(src, dst);
+ Status error = platform_sp->Install(src, dst);
if (error.Success()) {
result.SetStatus(eReturnStatusSuccessFinishNoResult);
} else {
diff --git a/lldb/source/Commands/CommandObjectPlugin.cpp b/lldb/source/Commands/CommandObjectPlugin.cpp
index 7ae968b95fc..7e1b7f61f76 100644
--- a/lldb/source/Commands/CommandObjectPlugin.cpp
+++ b/lldb/source/Commands/CommandObjectPlugin.cpp
@@ -68,7 +68,7 @@ protected:
return false;
}
- Error error;
+ Status error;
FileSpec dylib_fspec(command[0].ref, true);
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 557bdeecc22..9fbdd763054 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) {
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index 4d856d6bd1e..6de8c667e7a 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -257,9 +257,9 @@ protected:
alternate_name.Clear();
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = GetDefinitions()[option_idx].short_option;
switch (short_option) {
case 's': {
@@ -367,7 +367,7 @@ protected:
if (reg_info) {
RegisterValue reg_value;
- Error error(reg_value.SetValueFromString(reg_info, value_str));
+ Status error(reg_value.SetValueFromString(reg_info, value_str));
if (error.Success()) {
if (reg_ctx->WriteRegister(reg_info, reg_value)) {
// Toss all frames and anything else in the thread
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 4a9f69f9c19..d42466cd13b 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -102,9 +102,9 @@ insert-before or insert-after.");
~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) {
@@ -167,7 +167,7 @@ insert-before or insert-after.");
// Complete setting value
const char *setting_var_name =
input.GetArgumentAtIndex(setting_var_idx);
- Error error;
+ Status error;
lldb::OptionValueSP value_sp(
m_interpreter.GetDebugger().GetPropertyValue(
&m_exe_ctx, setting_var_name, false, error));
@@ -211,7 +211,7 @@ protected:
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, false, false);
- Error error;
+ Status error;
if (m_options.m_global) {
error = m_interpreter.GetDebugger().SetPropertyValue(
nullptr, eVarSetOperationAssign, var_name, var_value_cstr);
@@ -296,7 +296,7 @@ protected:
if (!args.empty()) {
for (const auto &arg : args) {
- Error error(m_interpreter.GetDebugger().DumpPropertyValue(
+ Status error(m_interpreter.GetDebugger().DumpPropertyValue(
&m_exe_ctx, result.GetOutputStream(), arg.ref,
OptionValue::eDumpGroupValue));
if (error.Success()) {
@@ -494,7 +494,7 @@ protected:
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Error error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(m_interpreter.GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationRemove, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
@@ -602,7 +602,7 @@ protected:
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Error error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(m_interpreter.GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationReplace, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
@@ -716,7 +716,7 @@ protected:
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Error error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(m_interpreter.GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationInsertBefore, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
@@ -827,7 +827,7 @@ protected:
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Error error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(m_interpreter.GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationInsertAfter, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
@@ -929,7 +929,7 @@ protected:
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Error error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(m_interpreter.GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationAppend, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
@@ -1006,7 +1006,7 @@ protected:
return false;
}
- Error error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(m_interpreter.GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationClear, var_name, llvm::StringRef()));
if (error.Fail()) {
result.AppendError(error.AsCString());
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 1b9ee1bf8c7..f3c92b9a28c 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -59,9 +59,9 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
~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 = GetDefinitions()[option_idx].short_option;
switch (short_option) {
case 'l':
@@ -683,9 +683,9 @@ class CommandObjectSourceList : public CommandObjectParsed {
~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 = GetDefinitions()[option_idx].short_option;
switch (short_option) {
case 'l':
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index a2df4909dc0..56da1da34cb 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -284,7 +284,7 @@ protected:
llvm::StringRef arch_cstr = m_arch_option.GetArchitectureName();
const bool get_dependent_files =
m_add_dependents.GetOptionValue().GetCurrentValue();
- Error error(debugger.GetTargetList().CreateTarget(
+ Status error(debugger.GetTargetList().CreateTarget(
debugger, file_path, arch_cstr, get_dependent_files, nullptr,
target_sp));
@@ -303,7 +303,7 @@ protected:
if (file_spec && file_spec.Exists()) {
// if the remote file does not exist, push it there
if (!platform_sp->GetFileExists(remote_file)) {
- Error err = platform_sp->PutFile(file_spec, remote_file);
+ Status err = platform_sp->PutFile(file_spec, remote_file);
if (err.Fail()) {
result.AppendError(err.AsCString());
result.SetStatus(eReturnStatusFailed);
@@ -324,7 +324,7 @@ protected:
}
if (file_path) {
// copy the remote file to the local file
- Error err = platform_sp->GetFile(remote_file, file_spec);
+ Status err = platform_sp->GetFile(remote_file, file_spec);
if (err.Fail()) {
result.AppendError(err.AsCString());
result.SetStatus(eReturnStatusFailed);
@@ -839,7 +839,7 @@ protected:
matches = target->GetImages().FindGlobalVariables(
regex, true, UINT32_MAX, variable_list);
} else {
- Error error(Variable::GetValuesForVariableExpressionPath(
+ Status error(Variable::GetValuesForVariableExpressionPath(
arg, m_exe_ctx.GetBestExecutionContextScope(),
GetVariableCallback, target, variable_list, valobj_list));
matches = variable_list.GetSize();
@@ -1993,9 +1993,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) {
@@ -2515,7 +2515,7 @@ protected:
m_symbol_file.GetOptionValue().GetCurrentValue();
if (!module_spec.GetArchitecture().IsValid())
module_spec.GetArchitecture() = target->GetArchitecture();
- Error error;
+ Status error;
ModuleSP module_sp(target->GetSharedModule(module_spec, &error));
if (!module_sp) {
const char *error_cstr = error.AsCString();
@@ -2750,7 +2750,7 @@ protected:
process->Flush();
}
if (load) {
- Error error = module->LoadInMemory(*target, set_pc);
+ Status error = module->LoadInMemory(*target, set_pc);
if (error.Fail()) {
result.AppendError(error.AsCString());
return false;
@@ -2857,9 +2857,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;
if (short_option == 'g') {
@@ -3220,9 +3220,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;
@@ -3520,9 +3520,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;
@@ -4114,7 +4114,7 @@ protected:
// Make sure we load any scripting resources that may be embedded
// in the debug info files in case the platform supports that.
- Error error;
+ Status error;
StreamString feedback_stream;
module_sp->LoadScriptingResourceInTarget(target, error,
&feedback_stream);
@@ -4398,9 +4398,9 @@ public:
return llvm::makeArrayRef(g_target_stop_hook_add_options);
}
- 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) {
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 7ba6f2c19a8..6b0f1b455bc 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -162,9 +162,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) {
@@ -330,9 +330,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) {
@@ -556,7 +556,7 @@ protected:
AddressRange range;
SymbolContext sc = frame->GetSymbolContext(eSymbolContextEverything);
if (m_options.m_end_line != LLDB_INVALID_LINE_NUMBER) {
- Error error;
+ Status error;
if (!sc.GetAddressRangeFromHereToEndLine(m_options.m_end_line, range,
error)) {
result.AppendErrorWithFormat("invalid end-line option: %s.",
@@ -565,7 +565,7 @@ protected:
return false;
}
} else if (m_options.m_end_line_is_block_end) {
- Error error;
+ Status error;
Block *block = frame->GetSymbolContext(eSymbolContextBlock).block;
if (!block) {
result.AppendErrorWithFormat("Could not find the current block.");
@@ -660,7 +660,7 @@ protected:
const uint32_t iohandler_id = process->GetIOHandlerID();
StreamString stream;
- Error error;
+ Status error;
if (synchronous_execution)
error = process->ResumeSynchronous(&stream);
else
@@ -841,7 +841,7 @@ public:
}
StreamString stream;
- Error error;
+ Status error;
if (synchronous_execution)
error = process->ResumeSynchronous(&stream);
else
@@ -908,9 +908,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) {
@@ -1174,7 +1174,7 @@ protected:
process->GetThreadList().SetSelectedThreadByID(m_options.m_thread_idx);
StreamString stream;
- Error error;
+ Status error;
if (synchronous_execution)
error = process->ResumeSynchronous(&stream);
else
@@ -1325,10 +1325,10 @@ public:
m_json_stopinfo = false;
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
const int short_option = m_getopt_table[option_idx].val;
- Error error;
+ Status error;
switch (short_option) {
case 'j':
@@ -1340,7 +1340,7 @@ public:
break;
default:
- return Error("invalid short option character '%c'", short_option);
+ return Status("invalid short option character '%c'", short_option);
}
return error;
}
@@ -1418,9 +1418,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) {
@@ -1498,7 +1498,7 @@ protected:
"called expressions");
Thread *thread = m_exe_ctx.GetThreadPtr();
- Error error;
+ Status error;
error = thread->UnwindInnermostExpression();
if (!error.Success()) {
result.AppendErrorWithFormat("Unwinding expression failed - %s.",
@@ -1553,7 +1553,7 @@ protected:
}
}
- Error error;
+ Status error;
ThreadSP thread_sp = m_exe_ctx.GetThreadSP();
const bool broadcast = true;
error = thread_sp->ReturnFromFrame(frame_sp, return_valobj_sp, broadcast);
@@ -1602,24 +1602,24 @@ public:
m_force = false;
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override {
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override {
const int short_option = m_getopt_table[option_idx].val;
- Error error;
+ Status error;
switch (short_option) {
case 'f':
m_filenames.AppendIfUnique(FileSpec(option_arg, false));
if (m_filenames.GetSize() > 1)
- return Error("only one source file expected.");
+ return Status("only one source file expected.");
break;
case 'l':
if (option_arg.getAsInteger(0, m_line_num))
- return Error("invalid line number: '%s'.", option_arg.str().c_str());
+ return Status("invalid line number: '%s'.", option_arg.str().c_str());
break;
case 'b':
if (option_arg.getAsInteger(0, m_line_offset))
- return Error("invalid line offset: '%s'.", option_arg.str().c_str());
+ return Status("invalid line offset: '%s'.", option_arg.str().c_str());
break;
case 'a':
m_load_addr = Args::StringToAddress(execution_context, option_arg,
@@ -1629,7 +1629,7 @@ public:
m_force = true;
break;
default:
- return Error("invalid short option character '%c'", short_option);
+ return Status("invalid short option character '%c'", short_option);
}
return error;
}
@@ -1702,7 +1702,7 @@ protected:
}
std::string warnings;
- Error err = thread->JumpToLine(file, line, m_options.m_force, &warnings);
+ Status err = thread->JumpToLine(file, line, m_options.m_force, &warnings);
if (err.Fail()) {
result.SetError(err);
@@ -1747,9 +1747,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) {
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index b34a42738d4..2d4271cab36 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -127,8 +127,8 @@ private:
~CommandOptions() override = default;
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
- ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+ ExecutionContext *execution_context) override;
void OptionParsingStarting(ExecutionContext *execution_context) override;
@@ -213,7 +213,7 @@ public:
options->m_flags, funct_name_str.c_str(),
lines.CopyList(" ").c_str()));
- Error error;
+ Status error;
for (size_t i = 0; i < options->m_target_types.GetSize(); i++) {
const char *type_name =
@@ -283,7 +283,7 @@ public:
static bool AddSummary(ConstString type_name, lldb::TypeSummaryImplSP entry,
SummaryFormatType type, std::string category,
- Error *error = nullptr);
+ Status *error = nullptr);
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override;
@@ -321,9 +321,9 @@ private:
~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;
bool success;
@@ -464,7 +464,7 @@ protected:
DataVisualization::Categories::GetCategory(
ConstString(options->m_category.c_str()), category);
- Error error;
+ Status error;
for (size_t i = 0; i < options->m_target_types.GetSize(); i++) {
const char *type_name =
@@ -523,7 +523,7 @@ public:
static bool AddSynth(ConstString type_name, lldb::SyntheticChildrenSP entry,
SynthFormatType type, std::string category_name,
- Error *error);
+ Status *error);
};
//-------------------------------------------------------------------------
@@ -562,9 +562,9 @@ private:
m_custom_type_name.clear();
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option =
g_type_format_add_options[option_idx].short_option;
bool success;
@@ -769,9 +769,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) {
@@ -909,9 +909,9 @@ private:
~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) {
@@ -1025,9 +1025,9 @@ class CommandObjectTypeFormatterList : public CommandObjectParsed {
~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 'w':
@@ -1243,10 +1243,10 @@ public:
#endif // LLDB_DISABLE_PYTHON
-Error CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue(
+Status CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue(
uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) {
- Error error;
+ Status error;
const int short_option = m_getopt_table[option_idx].val;
bool success;
@@ -1423,7 +1423,7 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
// if I am here, script_format must point to something good, so I can add that
// as a script summary to all interested parties
- Error error;
+ Status error;
for (auto &entry : command.entries()) {
CommandObjectTypeSummaryAdd::AddSummary(
@@ -1498,7 +1498,7 @@ bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
lldb::TypeSummaryImplSP entry(string_format.release());
// now I have a valid format, let's add it to every type
- Error error;
+ Status error;
for (auto &arg_entry : command.entries()) {
if (arg_entry.ref.empty()) {
result.AppendError("empty typenames not allowed");
@@ -1681,7 +1681,7 @@ bool CommandObjectTypeSummaryAdd::AddSummary(ConstString type_name,
TypeSummaryImplSP entry,
SummaryFormatType type,
std::string category_name,
- Error *error) {
+ Status *error) {
lldb::TypeCategoryImplSP category;
DataVisualization::Categories::GetCategory(ConstString(category_name.c_str()),
category);
@@ -1799,9 +1799,9 @@ class CommandObjectTypeCategoryDefine : public CommandObjectParsed {
~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) {
@@ -1903,9 +1903,9 @@ class CommandObjectTypeCategoryEnable : public CommandObjectParsed {
~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) {
@@ -2080,9 +2080,9 @@ class CommandObjectTypeCategoryDisable : public CommandObjectParsed {
~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) {
@@ -2407,7 +2407,7 @@ bool CommandObjectTypeSynthAdd::Execute_PythonClass(
DataVisualization::Categories::GetCategory(
ConstString(m_options.m_category.c_str()), category);
- Error error;
+ Status error;
for (auto &arg_entry : command.entries()) {
if (arg_entry.ref.empty()) {
@@ -2450,7 +2450,7 @@ bool CommandObjectTypeSynthAdd::AddSynth(ConstString type_name,
SyntheticChildrenSP entry,
SynthFormatType type,
std::string category_name,
- Error *error) {
+ Status *error) {
lldb::TypeCategoryImplSP category;
DataVisualization::Categories::GetCategory(ConstString(category_name.c_str()),
category);
@@ -2512,9 +2512,9 @@ private:
~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;
bool success;
@@ -2586,7 +2586,7 @@ private:
bool AddFilter(ConstString type_name, TypeFilterImplSP entry,
FilterFormatType type, std::string category_name,
- Error *error) {
+ Status *error) {
lldb::TypeCategoryImplSP category;
DataVisualization::Categories::GetCategory(
ConstString(category_name.c_str()), category);
@@ -2717,7 +2717,7 @@ protected:
DataVisualization::Categories::GetCategory(
ConstString(m_options.m_category.c_str()), category);
- Error error;
+ Status error;
WarnOnPotentialUnquotedUnsignedType(command, result);
@@ -2787,9 +2787,9 @@ protected:
return llvm::makeArrayRef(g_type_lookup_options);
}
- Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
- ExecutionContext *execution_context) override {
- Error error;
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override {
+ Status error;
const int short_option = g_type_lookup_options[option_idx].short_option;
@@ -2899,7 +2899,7 @@ public:
if (!ParseOptions(args, result))
return false;
- Error error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
+ Status error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 1ad53cdb88a..9c84c992e71 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -197,9 +197,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) {
@@ -245,7 +245,7 @@ protected:
if (target->GetProcessSP() && target->GetProcessSP()->IsAlive()) {
uint32_t num_supported_hardware_watchpoints;
- Error error = target->GetProcessSP()->GetWatchpointSupportInfo(
+ Status error = target->GetProcessSP()->GetWatchpointSupportInfo(
num_supported_hardware_watchpoints);
if (error.Success())
result.AppendMessageWithFormat(
@@ -561,9 +561,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) {
@@ -689,9 +689,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) {
@@ -881,7 +881,7 @@ protected:
}
// Things have checked out ok...
- Error error;
+ Status error;
uint32_t expr_path_options =
StackFrame::eExpressionPathOptionCheckPtrVsMember |
StackFrame::eExpressionPathOptionsAllowDirectIVarAccess;
@@ -895,7 +895,7 @@ protected:
VariableList variable_list;
ValueObjectList valobj_list;
- Error error(Variable::GetValuesForVariableExpressionPath(
+ Status error(Variable::GetValuesForVariableExpressionPath(
command.GetArgumentAtIndex(0),
m_exe_ctx.GetBestExecutionContextScope(), GetVariableCallback, target,
variable_list, valobj_list));
@@ -1060,7 +1060,7 @@ protected:
if (!ParseOptions(args, result))
return false;
- Error error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
+ Status error(m_option_group.NotifyOptionParsingFinished(&exe_ctx));
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
@@ -1135,7 +1135,7 @@ protected:
/// of the expression, so convert to that if we found a valid type.
CompilerType compiler_type(valobj_sp->GetCompilerType());
- Error error;
+ Status error;
Watchpoint *wp =
target->CreateWatchpoint(addr, size, &compiler_type, watch_type, error)
.get();
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 1509c487a8a..ec7e4a1f9cd 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -319,9 +319,9 @@ are no syntax errors may indicate that a function was declared but never called.
~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) {
OpenPOWER on IntegriCloud