diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index b77bd8b..10e761f 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -186,8 +186,8 @@ public: if (error.Success()) m_load_dependent_files = tmp_load_dependents; } else { - error.SetErrorStringWithFormat("unrecognized short option '%c'", - short_option); + error = Status::FromErrorStringWithFormat( + "unrecognized short option '%c'", short_option); } return error; @@ -3461,8 +3461,8 @@ public: m_addr = OptionArgParser::ToAddress(execution_context, option_arg, LLDB_INVALID_ADDRESS, &error); if (m_addr == LLDB_INVALID_ADDRESS) - error.SetErrorStringWithFormat("invalid address string '%s'", - option_arg.str().c_str()); + error = Status::FromErrorStringWithFormat( + "invalid address string '%s'", option_arg.str().c_str()); break; } @@ -3805,8 +3805,8 @@ public: case 'o': if (option_arg.getAsInteger(0, m_offset)) - error.SetErrorStringWithFormat("invalid offset string '%s'", - option_arg.str().c_str()); + error = Status::FromErrorStringWithFormat( + "invalid offset string '%s'", option_arg.str().c_str()); break; case 's': @@ -3825,10 +3825,10 @@ public: case 'l': if (option_arg.getAsInteger(0, m_line_number)) - error.SetErrorStringWithFormat("invalid line number string '%s'", - option_arg.str().c_str()); + error = Status::FromErrorStringWithFormat( + "invalid line number string '%s'", option_arg.str().c_str()); else if (m_line_number == 0) - error.SetErrorString("zero is an invalid line number"); + error = Status::FromErrorString("zero is an invalid line number"); m_type = eLookupTypeFileLine; break; @@ -3886,8 +3886,9 @@ public: Status OptionParsingFinished(ExecutionContext *execution_context) override { Status status; if (m_all_ranges && !m_verbose) { - status.SetErrorString("--show-variable-ranges must be used in " - "conjunction with --verbose."); + status = + Status::FromErrorString("--show-variable-ranges must be used in " + "conjunction with --verbose."); } return status; } @@ -4709,8 +4710,8 @@ public: case 'e': if (option_arg.getAsInteger(0, m_line_end)) { - error.SetErrorStringWithFormat("invalid end line number: \"%s\"", - option_arg.str().c_str()); + error = Status::FromErrorStringWithFormat( + "invalid end line number: \"%s\"", option_arg.str().c_str()); break; } m_sym_ctx_specified = true; @@ -4722,14 +4723,14 @@ public: if (success) { m_auto_continue = value; } else - error.SetErrorStringWithFormat( + error = Status::FromErrorStringWithFormat( "invalid boolean value '%s' passed for -G option", option_arg.str().c_str()); } break; case 'l': if (option_arg.getAsInteger(0, m_line_start)) { - error.SetErrorStringWithFormat("invalid start line number: \"%s\"", - option_arg.str().c_str()); + error = Status::FromErrorStringWithFormat( + "invalid start line number: \"%s\"", option_arg.str().c_str()); break; } m_sym_ctx_specified = true; @@ -4757,8 +4758,8 @@ public: case 't': if (option_arg.getAsInteger(0, m_thread_id)) - error.SetErrorStringWithFormat("invalid thread id string '%s'", - option_arg.str().c_str()); + error = Status::FromErrorStringWithFormat( + "invalid thread id string '%s'", option_arg.str().c_str()); m_thread_specified = true; break; @@ -4774,8 +4775,8 @@ public: case 'x': if (option_arg.getAsInteger(0, m_thread_index)) - error.SetErrorStringWithFormat("invalid thread index string '%s'", - option_arg.str().c_str()); + error = Status::FromErrorStringWithFormat( + "invalid thread index string '%s'", option_arg.str().c_str()); m_thread_specified = true; break; |