[Lldb-commits] [lldb] eaf60a4 - [lldb] Remove redundant calls to set eReturnStatusFailed

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 17 06:39:43 PDT 2021


Author: David Spickett
Date: 2021-06-17T14:39:35+01:00
New Revision: eaf60a4411f79a1addfa6c5d8ddf4b47e082881e

URL: https://github.com/llvm/llvm-project/commit/eaf60a4411f79a1addfa6c5d8ddf4b47e082881e
DIFF: https://github.com/llvm/llvm-project/commit/eaf60a4411f79a1addfa6c5d8ddf4b47e082881e.diff

LOG: [lldb] Remove redundant calls to set eReturnStatusFailed

This is part 2, covering the commands source.

Some uses remain where it's tricky to see what the
logic is or they are not used with AppendError.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D104448

Added: 
    

Modified: 
    lldb/source/Commands/CommandObjectApropos.cpp
    lldb/source/Commands/CommandObjectBreakpoint.cpp
    lldb/source/Commands/CommandObjectBreakpointCommand.cpp
    lldb/source/Commands/CommandObjectCommands.cpp
    lldb/source/Commands/CommandObjectDisassemble.cpp
    lldb/source/Commands/CommandObjectExpression.cpp
    lldb/source/Commands/CommandObjectFrame.cpp
    lldb/source/Commands/CommandObjectGUI.cpp
    lldb/source/Commands/CommandObjectHelp.cpp
    lldb/source/Commands/CommandObjectLog.cpp
    lldb/source/Commands/CommandObjectMemory.cpp
    lldb/source/Commands/CommandObjectMultiword.cpp
    lldb/source/Commands/CommandObjectPlatform.cpp
    lldb/source/Commands/CommandObjectPlugin.cpp
    lldb/source/Commands/CommandObjectProcess.cpp
    lldb/source/Commands/CommandObjectQuit.cpp
    lldb/source/Commands/CommandObjectRegister.cpp
    lldb/source/Commands/CommandObjectReproducer.cpp
    lldb/source/Commands/CommandObjectScript.cpp
    lldb/source/Commands/CommandObjectSettings.cpp
    lldb/source/Commands/CommandObjectSource.cpp
    lldb/source/Commands/CommandObjectStats.cpp
    lldb/source/Commands/CommandObjectTarget.cpp
    lldb/source/Commands/CommandObjectThread.cpp
    lldb/source/Commands/CommandObjectThreadUtil.cpp
    lldb/source/Commands/CommandObjectTrace.cpp
    lldb/source/Commands/CommandObjectType.cpp
    lldb/source/Commands/CommandObjectWatchpoint.cpp
    lldb/source/Commands/CommandObjectWatchpointCommand.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Commands/CommandObjectApropos.cpp b/lldb/source/Commands/CommandObjectApropos.cpp
index 6e1e1f0617333..656487169a34d 100644
--- a/lldb/source/Commands/CommandObjectApropos.cpp
+++ b/lldb/source/Commands/CommandObjectApropos.cpp
@@ -86,11 +86,9 @@ bool CommandObjectApropos::DoExecute(Args &args, CommandReturnObject &result) {
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
     } else {
       result.AppendError("'' is not a valid search word.\n");
-      result.SetStatus(eReturnStatusFailed);
     }
   } else {
     result.AppendError("'apropos' must be called with exactly one argument.\n");
-    result.SetStatus(eReturnStatusFailed);
   }
 
   return result.Succeeded();

diff  --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 3f5311b824a95..9460ffdaa2f27 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -566,13 +566,11 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
       if (num_files == 0) {
         if (!GetDefaultFile(target, file, result)) {
           result.AppendError("No file supplied and no default file available.");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       } else if (num_files > 1) {
         result.AppendError("Only one file at a time is allowed for file and "
                            "line breakpoints.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       } else
         file = m_options.m_filenames.GetFileSpecAtIndex(0);
@@ -604,7 +602,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
       } else {
         result.AppendError("Only one shared library can be specified for "
                            "address breakpoints.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       break;
@@ -639,7 +636,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
             result.AppendWarning(
                 "Function name regex does not accept glob patterns.");
         }
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -657,7 +653,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
         if (!GetDefaultFile(target, file, result)) {
           result.AppendError(
               "No files provided and could not find default file.");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else {
           m_options.m_filenames.Append(file);
@@ -669,7 +664,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "Source text regular expression could not be compiled: \"%s\"",
             llvm::toString(std::move(err)).c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       bp_sp = target.CreateSourceRegexBreakpoint(
@@ -688,7 +682,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
             "Error setting extra exception arguments: %s",
             precond_error.AsCString());
         target.RemoveBreakpointByID(bp_sp->GetID());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } break;
@@ -703,7 +696,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "Error setting extra exception arguments: %s", error.AsCString());
         target.RemoveBreakpointByID(bp_sp->GetID());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } break;
@@ -723,7 +715,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
             result.AppendErrorWithFormat("Invalid breakpoint name: %s",
                                          name.c_str());
             target.RemoveBreakpointByID(bp_sp->GetID());
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
         }
@@ -750,7 +741,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else if (!bp_sp) {
       result.AppendError("Breakpoint creation failed: No breakpoint created.");
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -767,12 +757,10 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
       if (cur_frame == nullptr) {
         result.AppendError(
             "No selected frame to use to find the default file.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       } else if (!cur_frame->HasDebugInformation()) {
         result.AppendError("Cannot use the selected frame to find the default "
                            "file, it has no debug info.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       } else {
         const SymbolContext &sc =
@@ -782,7 +770,6 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
         } else {
           result.AppendError("Can't find the file for the selected frame to "
                              "use as the default file.");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
@@ -923,7 +910,6 @@ class CommandObjectBreakpointEnable : public CommandObjectParsed {
 
     if (num_breakpoints == 0) {
       result.AppendError("No breakpoints exist to be enabled.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1037,7 +1023,6 @@ the second re-enables the first location.");
 
     if (num_breakpoints == 0) {
       result.AppendError("No breakpoints exist to be disabled.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1223,7 +1208,6 @@ class CommandObjectBreakpointList : public CommandObjectParsed {
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
       } else {
         result.AppendError("Invalid breakpoint ID.");
-        result.SetStatus(eReturnStatusFailed);
       }
     }
 
@@ -1321,7 +1305,6 @@ class CommandObjectBreakpointClear : public CommandObjectParsed {
     // Early return if there's no breakpoint at all.
     if (num_breakpoints == 0) {
       result.AppendError("Breakpoint clear: No breakpoint cleared.");
-      result.SetStatus(eReturnStatusFailed);
       return result.Succeeded();
     }
 
@@ -1368,7 +1351,6 @@ class CommandObjectBreakpointClear : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
     } else {
       result.AppendError("Breakpoint clear: No breakpoint cleared.");
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -1473,7 +1455,6 @@ class CommandObjectBreakpointDelete : public CommandObjectParsed {
 
     if (num_breakpoints == 0) {
       result.AppendError("No breakpoints exist to be deleted.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1512,7 +1493,6 @@ class CommandObjectBreakpointDelete : public CommandObjectParsed {
         }
         if (valid_bp_ids.GetSize() == 0) {
           result.AppendError("No disabled breakpoints.");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       } else {
@@ -1726,7 +1706,6 @@ class CommandObjectBreakpointNameConfigure : public CommandObjectParsed {
     const size_t argc = command.GetArgumentCount();
     if (argc == 0) {
       result.AppendError("No names provided.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1741,7 +1720,6 @@ class CommandObjectBreakpointNameConfigure : public CommandObjectParsed {
       if (!BreakpointID::StringIsBreakpointName(entry.ref(), error)) {
         result.AppendErrorWithFormat("Invalid breakpoint name: %s - %s",
                                      entry.c_str(), error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1754,7 +1732,6 @@ class CommandObjectBreakpointNameConfigure : public CommandObjectParsed {
       if (!bp_sp) {
         result.AppendErrorWithFormatv("Could not find specified breakpoint {0}",
                                       bp_id);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1836,7 +1813,6 @@ class CommandObjectBreakpointNameAdd : public CommandObjectParsed {
     size_t num_breakpoints = breakpoints.GetSize();
     if (num_breakpoints == 0) {
       result.SetError("No breakpoints, cannot add names.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1849,7 +1825,6 @@ class CommandObjectBreakpointNameAdd : public CommandObjectParsed {
     if (result.Succeeded()) {
       if (valid_bp_ids.GetSize() == 0) {
         result.SetError("No breakpoints specified, cannot add names.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       size_t num_valid_ids = valid_bp_ids.GetSize();
@@ -1923,7 +1898,6 @@ class CommandObjectBreakpointNameDelete : public CommandObjectParsed {
     size_t num_breakpoints = breakpoints.GetSize();
     if (num_breakpoints == 0) {
       result.SetError("No breakpoints, cannot delete names.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1936,7 +1910,6 @@ class CommandObjectBreakpointNameDelete : public CommandObjectParsed {
     if (result.Succeeded()) {
       if (valid_bp_ids.GetSize() == 0) {
         result.SetError("No breakpoints specified, cannot delete names.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       ConstString bp_name(m_name_options.m_name.GetCurrentValue());
@@ -2212,7 +2185,6 @@ class CommandObjectBreakpointRead : public CommandObjectParsed {
 
     if (!error.Success()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2341,7 +2313,6 @@ class CommandObjectBreakpointWrite : public CommandObjectParsed {
     if (!error.Success()) {
       result.AppendErrorWithFormat("error serializing breakpoints: %s.",
                                    error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2434,7 +2405,6 @@ void CommandObjectMultiwordBreakpoint::VerifyIDs(
     } else {
       result.AppendError(
           "No breakpoint specified and no last created breakpoint.");
-      result.SetStatus(eReturnStatusFailed);
     }
     return;
   }
@@ -2476,14 +2446,12 @@ void CommandObjectMultiwordBreakpoint::VerifyIDs(
           result.AppendErrorWithFormat(
               "'%s' is not a currently valid breakpoint/location id.\n",
               id_str.GetData());
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         i = valid_ids->GetSize() + 1;
         result.AppendErrorWithFormat(
             "'%d' is not a currently valid breakpoint ID.\n",
             cur_bp_id.GetBreakpointID());
-        result.SetStatus(eReturnStatusFailed);
       }
     }
   }

diff  --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 4117eda2bf27f..26d35c82f57d0 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -371,7 +371,6 @@ are no syntax errors may indicate that a function was declared but never called.
 
     if (num_breakpoints == 0) {
       result.AppendError("No breakpoints exist to have commands added");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -545,14 +544,12 @@ class CommandObjectBreakpointCommandDelete : public CommandObjectParsed {
 
     if (num_breakpoints == 0) {
       result.AppendError("No breakpoints exist to have commands deleted");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     if (command.empty()) {
       result.AppendError(
           "No breakpoint specified from which to delete the commands");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -577,7 +574,6 @@ class CommandObjectBreakpointCommandDelete : public CommandObjectParsed {
               result.AppendErrorWithFormat("Invalid breakpoint ID: %u.%u.\n",
                                            cur_bp_id.GetBreakpointID(),
                                            cur_bp_id.GetLocationID());
-              result.SetStatus(eReturnStatusFailed);
               return false;
             }
           } else {
@@ -628,14 +624,12 @@ class CommandObjectBreakpointCommandList : public CommandObjectParsed {
 
     if (num_breakpoints == 0) {
       result.AppendError("No breakpoints exist for which to list commands");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     if (command.empty()) {
       result.AppendError(
           "No breakpoint specified for which to list the commands");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -660,7 +654,6 @@ class CommandObjectBreakpointCommandList : public CommandObjectParsed {
                 result.AppendErrorWithFormat("Invalid breakpoint ID: %u.%u.\n",
                                              cur_bp_id.GetBreakpointID(),
                                              cur_bp_id.GetLocationID());
-                result.SetStatus(eReturnStatusFailed);
                 return false;
               }
             }
@@ -695,7 +688,6 @@ class CommandObjectBreakpointCommandList : public CommandObjectParsed {
         } else {
           result.AppendErrorWithFormat("Invalid breakpoint ID: %u.\n",
                                        cur_bp_id.GetBreakpointID());
-          result.SetStatus(eReturnStatusFailed);
         }
       }
     }

diff  --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 94e670a3fad29..c6b0f7fdf3b19 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -128,7 +128,6 @@ class CommandObjectCommandsSource : public CommandObjectParsed {
       result.AppendErrorWithFormat(
           "'%s' takes exactly one executable filename argument.\n",
           GetCommandName().str().c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -380,7 +379,6 @@ rather than using a positional placeholder:"
 
     if (args.GetArgumentCount() < 2) {
       result.AppendError("'command alias' requires at least two arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -393,7 +391,6 @@ rather than using a positional placeholder:"
         result.AppendWarning("if trying to pass options to 'command alias' add "
                              "a -- at the end of the options");
       }
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -407,7 +404,6 @@ rather than using a positional placeholder:"
         raw_command_string = raw_command_string.substr(pos);
     } else {
       result.AppendError("Error parsing command string.  No alias created.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -416,7 +412,6 @@ rather than using a positional placeholder:"
       result.AppendErrorWithFormat(
           "'%s' is a permanent debugger command and cannot be redefined.\n",
           args[0].c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -432,7 +427,6 @@ rather than using a positional placeholder:"
                                    "'%s' does not begin with a valid command."
                                    "  No alias created.",
                                    original_raw_command_string.str().c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     } else if (!cmd_obj->WantsRawCommandString()) {
       // Note that args was initialized with the original command, and has not
@@ -472,12 +466,10 @@ rather than using a positional placeholder:"
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
       } else {
         result.AppendError("Unable to create requested alias.\n");
-        result.SetStatus(eReturnStatusFailed);
       }
 
     } else {
       result.AppendError("Unable to create requested alias.\n");
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -488,7 +480,6 @@ rather than using a positional placeholder:"
 
     if (argc < 2) {
       result.AppendError("'command alias' requires at least two arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -506,7 +497,6 @@ rather than using a positional placeholder:"
       result.AppendErrorWithFormat(
           "'%s' is a permanent debugger command and cannot be redefined.\n",
           alias_command.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -517,7 +507,6 @@ rather than using a positional placeholder:"
     if (!command_obj_sp) {
       result.AppendErrorWithFormat("'%s' is not an existing command.\n",
                                    actual_command.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     CommandObject *cmd_obj = command_obj_sp.get();
@@ -534,7 +523,6 @@ rather than using a positional placeholder:"
             "'%s' is not a valid sub-command of '%s'.  "
             "Unable to create alias.\n",
             args[0].c_str(), actual_command.c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -573,7 +561,6 @@ rather than using a positional placeholder:"
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
     } else {
       result.AppendError("Unable to create requested alias.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -626,7 +613,6 @@ class CommandObjectCommandsUnalias : public CommandObjectParsed {
 
     if (args.empty()) {
       result.AppendError("must call 'unalias' with a valid alias");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -637,7 +623,6 @@ class CommandObjectCommandsUnalias : public CommandObjectParsed {
           "'%s' is not a known command.\nTry 'help' to see a "
           "current list of commands.\n",
           args[0].c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -652,7 +637,6 @@ class CommandObjectCommandsUnalias : public CommandObjectParsed {
             "'%s' is a permanent debugger command and cannot be removed.\n",
             args[0].c_str());
       }
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -664,7 +648,6 @@ class CommandObjectCommandsUnalias : public CommandObjectParsed {
       else
         result.AppendErrorWithFormat("'%s' is not an existing alias.\n",
                                      args[0].c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -720,7 +703,6 @@ class CommandObjectCommandsDelete : public CommandObjectParsed {
       result.AppendErrorWithFormat("must call '%s' with one or more valid user "
                                    "defined regular expression command names",
                                    GetCommandName().str().c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -733,7 +715,6 @@ class CommandObjectCommandsDelete : public CommandObjectParsed {
           &error_msg_stream, command_name, llvm::StringRef(), llvm::StringRef(),
           generate_upropos, generate_type_lookup);
       result.AppendError(error_msg_stream.GetString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -741,7 +722,6 @@ class CommandObjectCommandsDelete : public CommandObjectParsed {
       result.AppendErrorWithFormat(
           "'%s' is a permanent debugger command and cannot be removed.\n",
           args[0].c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -846,7 +826,6 @@ a number follows 'f':"
     if (argc == 0) {
       result.AppendError("usage: 'command regex <command-name> "
                          "[s/<regex1>/<subst1>/ s/<regex2>/<subst2>/ ...]'\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -887,7 +866,6 @@ a number follows 'f':"
     }
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -1103,7 +1081,6 @@ class CommandObjectPythonFunction : public CommandObjectRaw {
                          m_function_name.c_str(), raw_command_line, m_synchro,
                          result, error, m_exe_ctx)) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     } else {
       // Don't change the status if the command already set it...
       if (result.GetStatus() == eReturnStatusInvalid) {
@@ -1189,7 +1166,6 @@ class CommandObjectScriptingObject : public CommandObjectRaw {
         !scripter->RunScriptBasedCommand(m_cmd_obj_sp, raw_command_line,
                                          m_synchro, result, error, m_exe_ctx)) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     } else {
       // Don't change the status if the command already set it...
       if (result.GetStatus() == eReturnStatusInvalid) {
@@ -1286,7 +1262,6 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed {
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     if (command.empty()) {
       result.AppendError("command script import needs one or more arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1296,7 +1271,6 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed {
       if (!source_dir) {
         result.AppendError("command script import -c can only be specified "
                            "from a command file");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1320,7 +1294,6 @@ class CommandObjectCommandsScriptImport : public CommandObjectParsed {
       } else {
         result.AppendErrorWithFormat("module importing failed: %s",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     }
 
@@ -1505,13 +1478,11 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
     if (GetDebugger().GetScriptLanguage() != lldb::eScriptLanguagePython) {
       result.AppendError("only scripting language supported for scripted "
                          "commands is currently Python");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     if (command.GetArgumentCount() != 1) {
       result.AppendError("'command script add' requires one argument");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1533,14 +1504,12 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
           result.SetStatus(eReturnStatusSuccessFinishNoResult);
         } else {
           result.AppendError("cannot add command");
-          result.SetStatus(eReturnStatusFailed);
         }
       }
     } else {
       ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
       if (!interpreter) {
         result.AppendError("cannot find ScriptInterpreter");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -1548,7 +1517,6 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
           m_options.m_class_name.c_str());
       if (!cmd_obj_sp) {
         result.AppendError("cannot create helper object");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -1558,7 +1526,6 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
       } else {
         result.AppendError("cannot add command");
-        result.SetStatus(eReturnStatusFailed);
       }
     }
 
@@ -1584,7 +1551,6 @@ class CommandObjectCommandsScriptList : public CommandObjectParsed {
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     if (command.GetArgumentCount() != 0) {
       result.AppendError("'command script list' doesn't take any arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1610,7 +1576,6 @@ class CommandObjectCommandsScriptClear : public CommandObjectParsed {
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     if (command.GetArgumentCount() != 0) {
       result.AppendError("'command script clear' doesn't take any arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1661,7 +1626,6 @@ class CommandObjectCommandsScriptDelete : public CommandObjectParsed {
 
     if (command.GetArgumentCount() != 1) {
       result.AppendError("'command script delete' requires one argument");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1670,7 +1634,6 @@ class CommandObjectCommandsScriptDelete : public CommandObjectParsed {
     if (cmd_name.empty() || !m_interpreter.HasUserCommands() ||
         !m_interpreter.UserCommandExists(cmd_name)) {
       result.AppendErrorWithFormat("command %s not found", command[0].c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 

diff  --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index a6d5ab68d569b..5e73fb8218ab9 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -414,7 +414,6 @@ bool CommandObjectDisassemble::DoExecute(Args &command,
   if (!m_options.arch.IsValid()) {
     result.AppendError(
         "use the --arch option or set the target architecture to disassemble");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -434,7 +433,6 @@ bool CommandObjectDisassemble::DoExecute(Args &command,
       result.AppendErrorWithFormat(
           "Unable to find Disassembler plug-in for the '%s' architecture.\n",
           m_options.arch.GetArchitectureName());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   } else if (flavor_string != nullptr && !disassembler->FlavorValidForArchSpec(
                                              m_options.arch, flavor_string))
@@ -450,7 +448,6 @@ bool CommandObjectDisassemble::DoExecute(Args &command,
         GetCommandInterpreter().GetDebugger().GetTerminalWidth();
     GetOptions()->GenerateOptionUsage(result.GetErrorStream(), this,
                                       terminal_width);
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -475,7 +472,6 @@ bool CommandObjectDisassemble::DoExecute(Args &command,
       GetRangesForSelectedMode(result);
   if (!ranges) {
     result.AppendError(toString(ranges.takeError()));
-    result.SetStatus(eReturnStatusFailed);
     return result.Succeeded();
   }
 
@@ -505,7 +501,6 @@ bool CommandObjectDisassemble::DoExecute(Args &command,
             "Failed to disassemble memory at 0x%8.8" PRIx64 ".\n",
             cur_range.GetBaseAddress().GetLoadAddress(target));
       }
-      result.SetStatus(eReturnStatusFailed);
     }
     if (print_sc_header)
       result.GetOutputStream() << "\n";

diff  --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 4f4318edc14fe..bf62f3f297cc6 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -411,7 +411,6 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
   if (m_command_options.top_level && !m_command_options.allow_jit) {
     result.AppendErrorWithFormat(
         "Can't disable JIT compilation for top-level expressions.\n");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -441,7 +440,6 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
             result.AppendErrorWithFormat(
                 "expression cannot be used with --element-count %s\n",
                 error.AsCString(""));
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
         }

diff  --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index b51bdb704fccf..d90e357bf1aa3 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -141,7 +141,6 @@ class CommandObjectFrameDiagnose : public CommandObjectParsed {
       if (m_options.reg.hasValue() || m_options.offset.hasValue()) {
         result.AppendError(
             "`frame diagnose --address` is incompatible with other arguments.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       valobj_sp = frame_sp->GuessValueForAddress(m_options.address.getValue());
@@ -152,7 +151,6 @@ class CommandObjectFrameDiagnose : public CommandObjectParsed {
       StopInfoSP stop_info_sp = thread->GetStopInfo();
       if (!stop_info_sp) {
         result.AppendError("No arguments provided, and no stop info.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -161,7 +159,6 @@ class CommandObjectFrameDiagnose : public CommandObjectParsed {
 
     if (!valobj_sp) {
       result.AppendError("No diagnosis available.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -323,7 +320,6 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
             // If you are already at the bottom of the stack, then just warn
             // and don't reset the frame.
             result.AppendError("Already at the bottom of the stack.");
-            result.SetStatus(eReturnStatusFailed);
             return false;
           } else
             frame_idx = 0;
@@ -342,7 +338,6 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
             // If we are already at the top of the stack, just warn and don't
             // reset the frame.
             result.AppendError("Already at the top of the stack.");
-            result.SetStatus(eReturnStatusFailed);
             return false;
           } else
             frame_idx = num_frames - 1;
@@ -363,7 +358,6 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
         if (command[0].ref().getAsInteger(0, frame_idx)) {
           result.AppendErrorWithFormat("invalid frame index argument '%s'.",
                                        command[0].c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       } else if (command.GetArgumentCount() == 0) {
@@ -382,7 +376,6 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
     } else {
       result.AppendErrorWithFormat("Frame index (%u) out of range.\n",
                                    frame_idx);
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -850,14 +843,12 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
   if (m_options.m_class_name.empty()) {
     result.AppendErrorWithFormat(
         "%s needs a Python class name (-l argument).\n", m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
   if (m_options.m_module.empty()) {
     result.AppendErrorWithFormat("%s needs a module name (-s argument).\n",
                                  m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -865,7 +856,6 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
     result.AppendErrorWithFormat(
         "%s needs at least one symbol name (-n argument).\n",
         m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -873,7 +863,6 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
     result.AppendErrorWithFormat(
         "%s needs only one symbol regular expression (-n argument).\n",
         m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -968,7 +957,6 @@ class CommandObjectFrameRecognizerDelete : public CommandObjectParsed {
               "About to delete all frame recognizers, do you want to do that?",
               true)) {
         result.AppendMessage("Operation cancelled...");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -982,7 +970,6 @@ class CommandObjectFrameRecognizerDelete : public CommandObjectParsed {
     if (command.GetArgumentCount() != 1) {
       result.AppendErrorWithFormat("'%s' takes zero or one arguments.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -990,7 +977,6 @@ class CommandObjectFrameRecognizerDelete : public CommandObjectParsed {
     if (!llvm::to_integer(command.GetArgumentAtIndex(0), recognizer_id)) {
       result.AppendErrorWithFormat("'%s' is not a valid recognizer id.\n",
                                    command.GetArgumentAtIndex(0));
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -999,7 +985,6 @@ class CommandObjectFrameRecognizerDelete : public CommandObjectParsed {
              .RemoveRecognizerWithID(recognizer_id)) {
       result.AppendErrorWithFormat("'%s' is not a valid recognizer id.\n",
                                    command.GetArgumentAtIndex(0));
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -1084,33 +1069,28 @@ class CommandObjectFrameRecognizerInfo : public CommandObjectParsed {
     if (!llvm::to_integer(frame_index_str, frame_index)) {
       result.AppendErrorWithFormat("'%s' is not a valid frame index.",
                                    frame_index_str);
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
       result.AppendError("no process");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     Thread *thread = m_exe_ctx.GetThreadPtr();
     if (thread == nullptr) {
       result.AppendError("no thread");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     if (command.GetArgumentCount() != 1) {
       result.AppendErrorWithFormat(
           "'%s' takes exactly one frame index argument.\n", m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     StackFrameSP frame_sp = thread->GetStackFrameAtIndex(frame_index);
     if (!frame_sp) {
       result.AppendErrorWithFormat("no frame with index %u", frame_index);
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 

diff  --git a/lldb/source/Commands/CommandObjectGUI.cpp b/lldb/source/Commands/CommandObjectGUI.cpp
index 3f45a26de228b..98624172b56a2 100644
--- a/lldb/source/Commands/CommandObjectGUI.cpp
+++ b/lldb/source/Commands/CommandObjectGUI.cpp
@@ -39,11 +39,9 @@ bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendError("the gui command requires an interactive terminal.");
-      result.SetStatus(eReturnStatusFailed);
     }
   } else {
     result.AppendError("the gui command takes no arguments.");
-    result.SetStatus(eReturnStatusFailed);
   }
   return true;
 #else

diff  --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp
index 6dc1868a2affc..4643ee30f0f9b 100644
--- a/lldb/source/Commands/CommandObjectHelp.cpp
+++ b/lldb/source/Commands/CommandObjectHelp.cpp
@@ -139,7 +139,6 @@ bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) {
           }
           s.Printf("\n");
           result.AppendError(s.GetString());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else if (!sub_cmd_obj) {
           StreamString error_msg_stream;
@@ -147,7 +146,6 @@ bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) {
               &error_msg_stream, cmd_string.c_str(),
               m_interpreter.GetCommandPrefix(), sub_command.c_str());
           result.AppendError(error_msg_stream.GetString());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else {
           GenerateAdditionalHelpAvenuesMessage(
@@ -193,7 +191,6 @@ bool CommandObjectHelp::DoExecute(Args &command, CommandReturnObject &result) {
                                              m_interpreter.GetCommandPrefix(),
                                              "");
         result.AppendError(error_msg_stream.GetString());
-        result.SetStatus(eReturnStatusFailed);
       }
     }
   }

diff  --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp
index 288ffdb183b9e..05ffba27e65fd 100644
--- a/lldb/source/Commands/CommandObjectLog.cpp
+++ b/lldb/source/Commands/CommandObjectLog.cpp
@@ -151,7 +151,6 @@ class CommandObjectLogEnable : public CommandObjectParsed {
       result.AppendErrorWithFormat(
           "%s takes a log channel and one or more log types.\n",
           m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -225,7 +224,6 @@ class CommandObjectLogDisable : public CommandObjectParsed {
       result.AppendErrorWithFormat(
           "%s takes a log channel and one or more log types.\n",
           m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 

diff  --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index e6decf120aebb..5c1bbc2f919eb 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -358,7 +358,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
                                    m_cmd_name.c_str());
       result.AppendWarning("Expressions should be quoted if they contain "
                            "spaces or other special characters.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -439,7 +438,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
             } else {
               result.AppendErrorWithFormat("invalid type string: '%s'\n",
                                            view_as_type_cstr);
-              result.SetStatus(eReturnStatusFailed);
               return false;
             }
             break;
@@ -489,7 +487,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
               "Mutiple types found matching raw type '%s', please disambiguate "
               "by specifying the language with -x",
               lookup_type_name.GetCString());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
 
@@ -504,7 +501,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
                                        "the raw type '%s' for full type '%s'\n",
                                        lookup_type_name.GetCString(),
                                        view_as_type_cstr);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else {
           TypeSP type_sp(type_list.GetTypeAtIndex(0));
@@ -518,7 +514,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
           compiler_type = pointer_type;
         else {
           result.AppendError("unable make a pointer type\n");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         --pointer_count;
@@ -529,7 +524,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "unable to get the byte size of the type '%s'\n",
             view_as_type_cstr);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       m_format_options.GetByteSizeValue() = *size;
@@ -543,7 +537,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
     // Look for invalid combinations of settings
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -593,7 +586,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
     if (addr == LLDB_INVALID_ADDRESS) {
       result.AppendError("invalid start address expression.");
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -603,21 +595,18 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
       if (end_addr == LLDB_INVALID_ADDRESS) {
         result.AppendError("invalid end address expression.");
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       } else if (end_addr <= addr) {
         result.AppendErrorWithFormat(
             "end address (0x%" PRIx64
             ") must be greater than the start address (0x%" PRIx64 ").\n",
             end_addr, addr);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       } else if (m_format_options.GetCountValue().OptionWasSet()) {
         result.AppendErrorWithFormat(
             "specify either the end address (0x%" PRIx64
             ") or the count (--count %" PRIu64 "), not both.\n",
             end_addr, (uint64_t)item_count);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -664,7 +653,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
             "can't allocate 0x%" PRIx32
             " bytes for the memory read buffer, specify a smaller size to read",
             (uint32_t)total_byte_size);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -679,7 +667,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
           result.AppendErrorWithFormat(
               "failed to read memory from 0x%" PRIx64 ".\n", addr);
         }
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -706,7 +693,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
             "can't allocate 0x%" PRIx64
             " bytes for the memory read buffer, specify a smaller size to read",
             (uint64_t)((item_byte_size + 1) * item_count));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       uint8_t *data_ptr = data_sp->GetBytes();
@@ -723,7 +709,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
         if (error.Fail()) {
           result.AppendErrorWithFormat(
               "failed to read memory from 0x%" PRIx64 ".\n", addr);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
 
@@ -790,7 +775,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
             result.AppendErrorWithFormat("Failed to write %" PRIu64
                                          " bytes to '%s'.\n",
                                          (uint64_t)bytes_read, path.c_str());
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
         } else {
@@ -804,7 +788,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
                                      path.c_str(), append ? "append" : "write");
 
         result.AppendError(llvm::toString(outfile.takeError()));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
@@ -833,7 +816,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
           result.AppendErrorWithFormat(
               "failed to create a value object for: (%s) %s\n",
               view_as_type_cstr, name_strm.GetData());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
@@ -863,7 +845,6 @@ class CommandObjectMemoryRead : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "reading memory as characters of size %" PRIu64 " is not supported",
             (uint64_t)item_byte_size);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1294,14 +1275,12 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "%s takes a destination address when writing file contents.\n",
             m_cmd_name.c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else if (argc < 2) {
       result.AppendErrorWithFormat(
           "%s takes a destination address and at least one value.\n",
           m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1320,7 +1299,6 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
     if (addr == LLDB_INVALID_ADDRESS) {
       result.AppendError("invalid address expression\n");
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1355,12 +1333,10 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
             result.AppendErrorWithFormat("Memory write to 0x%" PRIx64
                                          " failed: %s.\n",
                                          addr, error.AsCString());
-            result.SetStatus(eReturnStatusFailed);
           }
         }
       } else {
         result.AppendErrorWithFormat("Unable to read contents of file.\n");
-        result.SetStatus(eReturnStatusFailed);
       }
       return result.Succeeded();
     } else if (item_byte_size == 0) {
@@ -1405,7 +1381,6 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
       case eFormatInstruction:
       case eFormatVoid:
         result.AppendError("unsupported format for writing memory");
-        result.SetStatus(eReturnStatusFailed);
         return false;
 
       case eFormatDefault:
@@ -1424,14 +1399,12 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
         if (!success) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid hex string value.\n", entry.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else if (!llvm::isUIntN(item_byte_size * 8, uval64)) {
           result.AppendErrorWithFormat("Value 0x%" PRIx64
                                        " is too large to fit in a %" PRIu64
                                        " byte unsigned integer value.\n",
                                        uval64, (uint64_t)item_byte_size);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         buffer.PutMaxHex64(uval64, item_byte_size);
@@ -1442,7 +1415,6 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
         if (!success) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid boolean string value.\n", entry.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         buffer.PutMaxHex64(uval64, item_byte_size);
@@ -1452,14 +1424,12 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
         if (entry.ref().getAsInteger(2, uval64)) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid binary string value.\n", entry.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else if (!llvm::isUIntN(item_byte_size * 8, uval64)) {
           result.AppendErrorWithFormat("Value 0x%" PRIx64
                                        " is too large to fit in a %" PRIu64
                                        " byte unsigned integer value.\n",
                                        uval64, (uint64_t)item_byte_size);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         buffer.PutMaxHex64(uval64, item_byte_size);
@@ -1482,7 +1452,6 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
           result.AppendErrorWithFormat("Memory write to 0x%" PRIx64
                                        " failed: %s.\n",
                                        addr, error.AsCString());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         break;
@@ -1491,14 +1460,12 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
         if (entry.ref().getAsInteger(0, sval64)) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid signed decimal value.\n", entry.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else if (!llvm::isIntN(item_byte_size * 8, sval64)) {
           result.AppendErrorWithFormat(
               "Value %" PRIi64 " is too large or small to fit in a %" PRIu64
               " byte signed integer value.\n",
               sval64, (uint64_t)item_byte_size);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         buffer.PutMaxHex64(sval64, item_byte_size);
@@ -1510,14 +1477,12 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
           result.AppendErrorWithFormat(
               "'%s' is not a valid unsigned decimal string value.\n",
               entry.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else if (!llvm::isUIntN(item_byte_size * 8, uval64)) {
           result.AppendErrorWithFormat("Value %" PRIu64
                                        " is too large to fit in a %" PRIu64
                                        " byte unsigned integer value.\n",
                                        uval64, (uint64_t)item_byte_size);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         buffer.PutMaxHex64(uval64, item_byte_size);
@@ -1527,14 +1492,12 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
         if (entry.ref().getAsInteger(8, uval64)) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid octal string value.\n", entry.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else if (!llvm::isUIntN(item_byte_size * 8, uval64)) {
           result.AppendErrorWithFormat("Value %" PRIo64
                                        " is too large to fit in a %" PRIu64
                                        " byte unsigned integer value.\n",
                                        uval64, (uint64_t)item_byte_size);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         buffer.PutMaxHex64(uval64, item_byte_size);
@@ -1552,7 +1515,6 @@ class CommandObjectMemoryWrite : public CommandObjectParsed {
         result.AppendErrorWithFormat("Memory write to 0x%" PRIx64
                                      " failed: %s.\n",
                                      addr, error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1605,7 +1567,6 @@ class CommandObjectMemoryHistory : public CommandObjectParsed {
     if (argc == 0 || argc > 1) {
       result.AppendErrorWithFormat("%s takes an address expression",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1616,7 +1577,6 @@ class CommandObjectMemoryHistory : public CommandObjectParsed {
     if (addr == LLDB_INVALID_ADDRESS) {
       result.AppendError("invalid address expression");
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1628,7 +1588,6 @@ class CommandObjectMemoryHistory : public CommandObjectParsed {
 
     if (!memory_history) {
       result.AppendError("no available memory history provider");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1667,7 +1626,6 @@ class CommandObjectMemoryRegion : public CommandObjectParsed {
     if (!process_sp) {
       m_prev_end_addr = LLDB_INVALID_ADDRESS;
       result.AppendError("invalid process");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1679,7 +1637,6 @@ class CommandObjectMemoryRegion : public CommandObjectParsed {
     if (argc > 1 || (argc == 0 && load_addr == LLDB_INVALID_ADDRESS)) {
       result.AppendErrorWithFormat("'%s' takes one argument:\nUsage: %s\n",
                                    m_cmd_name.c_str(), m_cmd_syntax.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1690,7 +1647,6 @@ class CommandObjectMemoryRegion : public CommandObjectParsed {
       if (error.Fail() || load_addr == LLDB_INVALID_ADDRESS) {
         result.AppendErrorWithFormat("invalid address argument \"%s\": %s\n",
                                      command[0].c_str(), error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1727,7 +1683,6 @@ class CommandObjectMemoryRegion : public CommandObjectParsed {
       return true;
     }
 
-    result.SetStatus(eReturnStatusFailed);
     result.AppendErrorWithFormat("%s\n", error.AsCString());
     return false;
   }

diff  --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index 0f20a1d88bd9a..9aca787d3036d 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -106,7 +106,6 @@ bool CommandObjectMultiword::Execute(const char *args_string,
   if (m_subcommand_dict.empty()) {
     result.AppendErrorWithFormat("'%s' does not have any subcommands.\n",
                                  GetCommandName().str().c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -144,7 +143,6 @@ bool CommandObjectMultiword::Execute(const char *args_string,
   }
   error_msg.append("\n");
   result.AppendRawError(error_msg.c_str());
-  result.SetStatus(eReturnStatusFailed);
   return false;
 }
 

diff  --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index b95b1c3d5655f..16fe05a400fd0 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -180,16 +180,13 @@ class CommandObjectPlatformSelect : public CommandObjectParsed {
           result.SetStatus(eReturnStatusSuccessFinishResult);
         } else {
           result.AppendError(error.AsCString());
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         result.AppendError("invalid platform name");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError(
           "platform create takes a platform name as an argument\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -232,7 +229,6 @@ class CommandObjectPlatformList : public CommandObjectParsed {
 
     if (idx == 0) {
       result.AppendError("no platforms are available\n");
-      result.SetStatus(eReturnStatusFailed);
     } else
       result.SetStatus(eReturnStatusSuccessFinishResult);
     return result.Succeeded();
@@ -266,7 +262,6 @@ class CommandObjectPlatformStatus : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendError("no platform is currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -298,15 +293,12 @@ class CommandObjectPlatformConnect : public CommandObjectParsed {
         platform_sp->ConnectToWaitingProcesses(GetDebugger(), error);
         if (error.Fail()) {
           result.AppendError(error.AsCString());
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         result.AppendErrorWithFormat("%s\n", error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform is currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -361,24 +353,20 @@ class CommandObjectPlatformDisconnect : public CommandObjectParsed {
             result.SetStatus(eReturnStatusSuccessFinishResult);
           } else {
             result.AppendErrorWithFormat("%s", error.AsCString());
-            result.SetStatus(eReturnStatusFailed);
           }
         } else {
           // Not connected...
           result.AppendErrorWithFormat(
               "not connected to '%s'",
               platform_sp->GetPluginName().GetCString());
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         // Bad args
         result.AppendError(
             "\"platform disconnect\" doesn't take any arguments");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform is currently selected");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -412,7 +400,6 @@ class CommandObjectPlatformSettings : public CommandObjectParsed {
             m_option_working_dir.GetOptionValue().GetCurrentValue());
     } else {
       result.AppendError("no platform is currently selected");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -457,11 +444,9 @@ class CommandObjectPlatformMkDir : public CommandObjectParsed {
         result.SetStatus(eReturnStatusSuccessFinishResult);
       } else {
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -521,11 +506,9 @@ class CommandObjectPlatformFOpen : public CommandObjectParsed {
         result.SetStatus(eReturnStatusSuccessFinishResult);
       } else {
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -560,7 +543,6 @@ class CommandObjectPlatformFClose : public CommandObjectParsed {
       if (!llvm::to_integer(cmd_line, fd)) {
         result.AppendErrorWithFormatv("'{0}' is not a valid file descriptor.\n",
                                       cmd_line);
-        result.SetStatus(eReturnStatusFailed);
         return result.Succeeded();
       }
       Status error;
@@ -570,11 +552,9 @@ class CommandObjectPlatformFClose : public CommandObjectParsed {
         result.SetStatus(eReturnStatusSuccessFinishResult);
       } else {
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -605,7 +585,6 @@ class CommandObjectPlatformFRead : public CommandObjectParsed {
       if (!llvm::to_integer(cmd_line, fd)) {
         result.AppendErrorWithFormatv("'{0}' is not a valid file descriptor.\n",
                                       cmd_line);
-        result.SetStatus(eReturnStatusFailed);
         return result.Succeeded();
       }
       std::string buffer(m_options.m_count, 0);
@@ -617,7 +596,6 @@ class CommandObjectPlatformFRead : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -698,7 +676,6 @@ class CommandObjectPlatformFWrite : public CommandObjectParsed {
       if (!llvm::to_integer(cmd_line, fd)) {
         result.AppendErrorWithFormatv("'{0}' is not a valid file descriptor.",
                                       cmd_line);
-        result.SetStatus(eReturnStatusFailed);
         return result.Succeeded();
       }
       uint32_t retcode =
@@ -708,7 +685,6 @@ class CommandObjectPlatformFWrite : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -866,11 +842,9 @@ class CommandObjectPlatformGetFile : public CommandObjectParsed {
       } else {
         result.AppendMessageWithFormat("get-file failed: %s\n",
                                        error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -941,11 +915,9 @@ class CommandObjectPlatformGetSize : public CommandObjectParsed {
         result.AppendMessageWithFormat(
             "Error getting file size of %s (remote)\n",
             remote_file_path.c_str());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -991,11 +963,9 @@ class CommandObjectPlatformPutFile : public CommandObjectParsed {
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
       } else {
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform currently selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1073,12 +1043,10 @@ class CommandObjectPlatformProcessLaunch : public CommandObjectParsed {
           result.AppendError("process launch failed");
         else
           result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       } else {
         result.AppendError("'platform process launch' uses the current target "
                            "file and arguments, or the executable and its "
                            "arguments can be specified in this command");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
@@ -1140,7 +1108,6 @@ class CommandObjectPlatformProcessList : public CommandObjectParsed {
             } else {
               result.AppendErrorWithFormat(
                   "no process found with pid = %" PRIu64 "\n", pid);
-              result.SetStatus(eReturnStatusFailed);
             }
           } else {
             ProcessInstanceInfoList proc_infos;
@@ -1182,7 +1149,6 @@ class CommandObjectPlatformProcessList : public CommandObjectParsed {
                 result.AppendErrorWithFormat(
                     "no processes were found on the \"%s\" platform\n",
                     platform_sp->GetPluginName().GetCString());
-              result.SetStatus(eReturnStatusFailed);
             } else {
               result.AppendMessageWithFormat(
                   "%u matching process%s found on \"%s\"", matches,
@@ -1204,11 +1170,9 @@ class CommandObjectPlatformProcessList : public CommandObjectParsed {
         }
       } else {
         result.AppendError("invalid args: process list takes only options\n");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform is selected\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1413,7 +1377,6 @@ class CommandObjectPlatformProcessInfo : public CommandObjectParsed {
             if (entry.ref().getAsInteger(0, pid)) {
               result.AppendErrorWithFormat("invalid process ID argument '%s'",
                                            entry.ref().str().c_str());
-              result.SetStatus(eReturnStatusFailed);
               break;
             } else {
               ProcessInstanceInfo proc_info;
@@ -1434,16 +1397,13 @@ class CommandObjectPlatformProcessInfo : public CommandObjectParsed {
           result.AppendErrorWithFormat(
               "not connected to '%s'",
               platform_sp->GetPluginName().GetCString());
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         // No args
         result.AppendError("one or more process id(s) must be specified");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("no platform is currently selected");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1532,15 +1492,12 @@ class CommandObjectPlatformProcessAttach : public CommandObjectParsed {
           m_options.attach_info, GetDebugger(), nullptr, err);
       if (err.Fail()) {
         result.AppendError(err.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       } else if (!remote_process_sp) {
         result.AppendError("could not attach: unknown reason");
-        result.SetStatus(eReturnStatusFailed);
       } else
         result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendError("no platform is currently selected");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1718,7 +1675,6 @@ class CommandObjectPlatformShell : public CommandObjectRaw {
 
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     } else {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     }
@@ -1752,7 +1708,6 @@ class CommandObjectPlatformInstall : public CommandObjectParsed {
   bool DoExecute(Args &args, CommandReturnObject &result) override {
     if (args.GetArgumentCount() != 2) {
       result.AppendError("platform target-install takes two arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     // TODO: move the bulk of this code over to the platform itself
@@ -1761,14 +1716,12 @@ class CommandObjectPlatformInstall : public CommandObjectParsed {
     FileSpec dst(args.GetArgumentAtIndex(1));
     if (!FileSystem::Instance().Exists(src)) {
       result.AppendError("source location does not exist or is not accessible");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     PlatformSP platform_sp(
         GetDebugger().GetPlatformList().GetSelectedPlatform());
     if (!platform_sp) {
       result.AppendError("no platform currently selected");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1777,7 +1730,6 @@ class CommandObjectPlatformInstall : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
     } else {
       result.AppendErrorWithFormat("install failed: %s", error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }

diff  --git a/lldb/source/Commands/CommandObjectPlugin.cpp b/lldb/source/Commands/CommandObjectPlugin.cpp
index 98a212eef0fab..881415a494728 100644
--- a/lldb/source/Commands/CommandObjectPlugin.cpp
+++ b/lldb/source/Commands/CommandObjectPlugin.cpp
@@ -50,7 +50,6 @@ class CommandObjectPluginLoad : public CommandObjectParsed {
 
     if (argc != 1) {
       result.AppendError("'plugin load' requires one argument");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -63,7 +62,6 @@ class CommandObjectPluginLoad : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     else {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();

diff  --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 031b7151d7af4..4aeef67bd6a19 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -79,7 +79,6 @@ class CommandObjectProcessLaunchOrAttach : public CommandObjectParsed {
               result.AppendErrorWithFormat(
                   "Failed to detach from process: %s\n",
                   detach_error.AsCString());
-              result.SetStatus(eReturnStatusFailed);
             }
           } else {
             Status destroy_error(process->Destroy(false));
@@ -89,7 +88,6 @@ class CommandObjectProcessLaunchOrAttach : public CommandObjectParsed {
             } else {
               result.AppendErrorWithFormat("Failed to kill process: %s\n",
                                            destroy_error.AsCString());
-              result.SetStatus(eReturnStatusFailed);
             }
           }
         }
@@ -162,7 +160,6 @@ class CommandObjectProcessLaunch : public CommandObjectProcessLaunchOrAttach {
     if (exe_module_sp == nullptr) {
       result.AppendError("no file in target, create a debug target using the "
                          "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -261,11 +258,9 @@ class CommandObjectProcessLaunch : public CommandObjectProcessLaunchOrAttach {
       } else {
         result.AppendError(
             "no error returned from Target::Launch, and target has no process");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -397,7 +392,6 @@ class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
     if (command.GetArgumentCount()) {
       result.AppendErrorWithFormat("Invalid arguments for '%s'.\nUsage: %s\n",
                                    m_cmd_name.c_str(), m_cmd_syntax.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -412,11 +406,9 @@ class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
       } else {
         result.AppendError(
             "no error returned from Target::Attach, and target has no process");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendErrorWithFormat("attach failed: %s\n", error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
 
     if (!result.Succeeded())
@@ -536,7 +528,6 @@ class CommandObjectProcessContinue : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "The '%s' command does not take any arguments.\n",
             m_cmd_name.c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -608,13 +599,11 @@ class CommandObjectProcessContinue : public CommandObjectParsed {
       } else {
         result.AppendErrorWithFormat("Failed to resume process: %s.\n",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendErrorWithFormat(
           "Process cannot be continued from its current state (%s).\n",
           StateAsCString(state));
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -706,7 +695,6 @@ class CommandObjectProcessDetach : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendErrorWithFormat("Detach failed: %s\n", error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     return result.Succeeded();
@@ -778,7 +766,6 @@ class CommandObjectProcessConnect : public CommandObjectParsed {
       result.AppendErrorWithFormat(
           "'%s' takes exactly one argument:\nUsage: %s\n", m_cmd_name.c_str(),
           m_cmd_syntax.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -788,7 +775,6 @@ class CommandObjectProcessConnect : public CommandObjectParsed {
           "Process %" PRIu64
           " is currently being debugged, kill the process before connecting.\n",
           process->GetID());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -810,7 +796,6 @@ class CommandObjectProcessConnect : public CommandObjectParsed {
                   error);
     if (error.Fail() || process_sp == nullptr) {
       result.AppendError(error.AsCString("Error connecting to the process"));
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     return true;
@@ -950,7 +935,6 @@ class CommandObjectProcessLoad : public CommandObjectParsed {
         result.AppendErrorWithFormat("failed to load '%s': %s",
                                      image_path.str().c_str(),
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     }
     return result.Succeeded();
@@ -1002,7 +986,6 @@ class CommandObjectProcessUnload : public CommandObjectParsed {
       if (entry.ref().getAsInteger(0, image_token)) {
         result.AppendErrorWithFormat("invalid image index argument '%s'",
                                      entry.ref().str().c_str());
-        result.SetStatus(eReturnStatusFailed);
         break;
       } else {
         Status error(process->GetTarget().GetPlatform()->UnloadImage(
@@ -1014,7 +997,6 @@ class CommandObjectProcessUnload : public CommandObjectParsed {
         } else {
           result.AppendErrorWithFormat("failed to unload image: %s",
                                        error.AsCString());
-          result.SetStatus(eReturnStatusFailed);
           break;
         }
       }
@@ -1081,7 +1063,6 @@ class CommandObjectProcessSignal : public CommandObjectParsed {
       if (signo == LLDB_INVALID_SIGNAL_NUMBER) {
         result.AppendErrorWithFormat("Invalid signal argument '%s'.\n",
                                      command.GetArgumentAtIndex(0));
-        result.SetStatus(eReturnStatusFailed);
       } else {
         Status error(process->Signal(signo));
         if (error.Success()) {
@@ -1089,14 +1070,12 @@ class CommandObjectProcessSignal : public CommandObjectParsed {
         } else {
           result.AppendErrorWithFormat("Failed to send signal %i: %s\n", signo,
                                        error.AsCString());
-          result.SetStatus(eReturnStatusFailed);
         }
       }
     } else {
       result.AppendErrorWithFormat(
           "'%s' takes exactly one signal number argument:\nUsage: %s\n",
           m_cmd_name.c_str(), m_cmd_syntax.c_str());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1121,7 +1100,6 @@ class CommandObjectProcessInterrupt : public CommandObjectParsed {
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
       result.AppendError("no process to halt");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1133,12 +1111,10 @@ class CommandObjectProcessInterrupt : public CommandObjectParsed {
       } else {
         result.AppendErrorWithFormat("Failed to halt process: %s\n",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendErrorWithFormat("'%s' takes no arguments:\nUsage: %s\n",
                                    m_cmd_name.c_str(), m_cmd_syntax.c_str());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1163,7 +1139,6 @@ class CommandObjectProcessKill : public CommandObjectParsed {
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
       result.AppendError("no process to kill");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1174,12 +1149,10 @@ class CommandObjectProcessKill : public CommandObjectParsed {
       } else {
         result.AppendErrorWithFormat("Failed to kill process: %s\n",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendErrorWithFormat("'%s' takes no arguments:\nUsage: %s\n",
                                    m_cmd_name.c_str(), m_cmd_syntax.c_str());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1212,16 +1185,13 @@ class CommandObjectProcessSaveCore : public CommandObjectParsed {
         } else {
           result.AppendErrorWithFormat(
               "Failed to save core file for process: %s\n", error.AsCString());
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         result.AppendErrorWithFormat("'%s' takes one arguments:\nUsage: %s\n",
                                      m_cmd_name.c_str(), m_cmd_syntax.c_str());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("invalid process");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1288,7 +1258,6 @@ class CommandObjectProcessStatus : public CommandObjectParsed {
 
     if (command.GetArgumentCount()) {
       result.AppendError("'process status' takes no arguments");
-      result.SetStatus(eReturnStatusFailed);
       return result.Succeeded();
     }
 
@@ -1308,7 +1277,6 @@ class CommandObjectProcessStatus : public CommandObjectParsed {
       PlatformSP platform_sp = process->GetTarget().GetPlatform();
       if (!platform_sp) {
         result.AppendError("Couldn'retrieve the target's platform");
-        result.SetStatus(eReturnStatusFailed);
         return result.Succeeded();
       }
 
@@ -1317,7 +1285,6 @@ class CommandObjectProcessStatus : public CommandObjectParsed {
 
       if (!expected_crash_info) {
         result.AppendError(llvm::toString(expected_crash_info.takeError()));
-        result.SetStatus(eReturnStatusFailed);
         return result.Succeeded();
       }
 
@@ -1486,7 +1453,6 @@ class CommandObjectProcessHandle : public CommandObjectParsed {
     if (!process_sp) {
       result.AppendError("No current process; cannot handle signals until you "
                          "have a valid process.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1498,7 +1464,6 @@ class CommandObjectProcessHandle : public CommandObjectParsed {
         !VerifyCommandOptionValue(m_options.stop, stop_action)) {
       result.AppendError("Invalid argument for command option --stop; must be "
                          "true or false.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1506,7 +1471,6 @@ class CommandObjectProcessHandle : public CommandObjectParsed {
         !VerifyCommandOptionValue(m_options.notify, notify_action)) {
       result.AppendError("Invalid argument for command option --notify; must "
                          "be true or false.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1514,7 +1478,6 @@ class CommandObjectProcessHandle : public CommandObjectParsed {
         !VerifyCommandOptionValue(m_options.pass, pass_action)) {
       result.AppendError("Invalid argument for command option --pass; must be "
                          "true or false.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 

diff  --git a/lldb/source/Commands/CommandObjectQuit.cpp b/lldb/source/Commands/CommandObjectQuit.cpp
index d4d15bea9a8ea..e4de347870753 100644
--- a/lldb/source/Commands/CommandObjectQuit.cpp
+++ b/lldb/source/Commands/CommandObjectQuit.cpp
@@ -75,7 +75,6 @@ bool CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) {
   if (command.GetArgumentCount() > 1) {
     result.AppendError("Too many arguments for 'quit'. Only an optional exit "
                        "code is allowed");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -88,13 +87,11 @@ bool CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) {
       std::string arg_str = arg.str();
       s.Printf("Couldn't parse '%s' as integer for exit code.", arg_str.data());
       result.AppendError(s.GetString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     if (!m_interpreter.SetQuitExitCode(exit_code)) {
       result.AppendError("The current driver doesn't allow custom exit codes"
                          " for the quit command.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }

diff  --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index 56e8c3fb4b84f..6fd71c90c327f 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -178,13 +178,11 @@ class CommandObjectRegisterRead : public CommandObjectParsed {
                                               llvm::sys::StrError());
               else
                 result.AppendError("unknown error while reading registers.\n");
-              result.SetStatus(eReturnStatusFailed);
               break;
             }
           } else {
             result.AppendErrorWithFormat(
                 "invalid register set index: %" PRIu64 "\n", (uint64_t)set_idx);
-            result.SetStatus(eReturnStatusFailed);
             break;
           }
         }
@@ -203,11 +201,9 @@ class CommandObjectRegisterRead : public CommandObjectParsed {
       if (m_command_options.dump_all_sets) {
         result.AppendError("the --all option can't be used when registers "
                            "names are supplied as arguments\n");
-        result.SetStatus(eReturnStatusFailed);
       } else if (m_command_options.set_indexes.GetSize() > 0) {
         result.AppendError("the --set <set> option can't be used when "
                            "registers names are supplied as arguments\n");
-        result.SetStatus(eReturnStatusFailed);
       } else {
         for (auto &entry : command) {
           // in most LLDB commands we accept $rbx as the name for register RBX
@@ -353,7 +349,6 @@ class CommandObjectRegisterWrite : public CommandObjectParsed {
     if (command.GetArgumentCount() != 2) {
       result.AppendError(
           "register write takes exactly 2 arguments: <reg-name> <value>");
-      result.SetStatus(eReturnStatusFailed);
     } else {
       auto reg_name = command[0].ref();
       auto value_str = command[1].ref();
@@ -390,11 +385,9 @@ class CommandObjectRegisterWrite : public CommandObjectParsed {
               "Failed to write register '%s' with value '%s'",
               reg_name.str().c_str(), value_str.str().c_str());
         }
-        result.SetStatus(eReturnStatusFailed);
       } else {
         result.AppendErrorWithFormat("Register not found for '%s'.\n",
                                      reg_name.str().c_str());
-        result.SetStatus(eReturnStatusFailed);
       }
     }
     return result.Succeeded();

diff  --git a/lldb/source/Commands/CommandObjectReproducer.cpp b/lldb/source/Commands/CommandObjectReproducer.cpp
index 55f34c05d11da..c8b2639344927 100644
--- a/lldb/source/Commands/CommandObjectReproducer.cpp
+++ b/lldb/source/Commands/CommandObjectReproducer.cpp
@@ -202,7 +202,6 @@ class CommandObjectReproducerGenerate : public CommandObjectParsed {
       return result.Succeeded();
     } else {
       result.AppendErrorWithFormat("Unable to get the reproducer generator");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 

diff  --git a/lldb/source/Commands/CommandObjectScript.cpp b/lldb/source/Commands/CommandObjectScript.cpp
index 9dadf11ebfc89..13e11ec615359 100644
--- a/lldb/source/Commands/CommandObjectScript.cpp
+++ b/lldb/source/Commands/CommandObjectScript.cpp
@@ -105,7 +105,6 @@ bool CommandObjectScript::DoExecute(llvm::StringRef command,
   if (language == lldb::eScriptLanguageNone) {
     result.AppendError(
         "the script-lang setting is set to none - scripting not available");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -114,7 +113,6 @@ bool CommandObjectScript::DoExecute(llvm::StringRef command,
 
   if (script_interpreter == nullptr) {
     result.AppendError("no script interpreter");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 

diff  --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 82335f432903e..cd79680e31f7d 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -177,7 +177,6 @@ insert-before or insert-after.");
 
     if ((argc < min_argc) && (!m_options.m_global)) {
       result.AppendError("'settings set' takes more arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -185,7 +184,6 @@ insert-before or insert-after.");
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError(
           "'settings set' command requires a valid variable name");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -196,7 +194,6 @@ insert-before or insert-after.");
           &m_exe_ctx, eVarSetOperationClear, var_name, llvm::StringRef()));
       if (error.Fail()) {
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       return result.Succeeded();
@@ -225,7 +222,6 @@ insert-before or insert-after.");
 
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     } else {
       result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -285,7 +281,6 @@ class CommandObjectSettingsShow : public CommandObjectParsed {
           result.GetOutputStream().EOL();
         } else {
           result.AppendError(error.AsCString());
-          result.SetStatus(eReturnStatusFailed);
         }
       }
     } else {
@@ -385,7 +380,6 @@ class CommandObjectSettingsWrite : public CommandObjectParsed {
 
     if (!out_file.GetFile().IsValid()) {
       result.AppendErrorWithFormat("%s: unable to write to file", path.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -403,7 +397,6 @@ class CommandObjectSettingsWrite : public CommandObjectParsed {
           &clean_ctx, out_file, arg.ref(), OptionValue::eDumpGroupExport));
       if (!error.Success()) {
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     }
 
@@ -543,7 +536,6 @@ class CommandObjectSettingsList : public CommandObjectParsed {
         } else {
           result.AppendErrorWithFormat("invalid property path '%s'",
                                        property_path);
-          result.SetStatus(eReturnStatusFailed);
         }
       }
     } else {
@@ -624,7 +616,6 @@ class CommandObjectSettingsRemove : public CommandObjectRaw {
                          "or an array followed by one or more indexes, or a "
                          "dictionary followed by one or more key names to "
                          "remove");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -632,7 +623,6 @@ class CommandObjectSettingsRemove : public CommandObjectRaw {
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError(
           "'settings remove' command requires a valid variable name");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -644,7 +634,6 @@ class CommandObjectSettingsRemove : public CommandObjectRaw {
         &m_exe_ctx, eVarSetOperationRemove, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -728,7 +717,6 @@ class CommandObjectSettingsReplace : public CommandObjectRaw {
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError("'settings replace' command requires a valid variable "
                          "name; No value supplied");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -740,7 +728,6 @@ class CommandObjectSettingsReplace : public CommandObjectRaw {
         &m_exe_ctx, eVarSetOperationReplace, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     } else {
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
@@ -822,7 +809,6 @@ class CommandObjectSettingsInsertBefore : public CommandObjectRaw {
 
     if (argc < 3) {
       result.AppendError("'settings insert-before' takes more arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -830,7 +816,6 @@ class CommandObjectSettingsInsertBefore : public CommandObjectRaw {
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError("'settings insert-before' command requires a valid "
                          "variable name; No value supplied");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -842,7 +827,6 @@ class CommandObjectSettingsInsertBefore : public CommandObjectRaw {
         &m_exe_ctx, eVarSetOperationInsertBefore, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -921,7 +905,6 @@ class CommandObjectSettingsInsertAfter : public CommandObjectRaw {
 
     if (argc < 3) {
       result.AppendError("'settings insert-after' takes more arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -929,7 +912,6 @@ class CommandObjectSettingsInsertAfter : public CommandObjectRaw {
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError("'settings insert-after' command requires a valid "
                          "variable name; No value supplied");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -941,7 +923,6 @@ class CommandObjectSettingsInsertAfter : public CommandObjectRaw {
         &m_exe_ctx, eVarSetOperationInsertAfter, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1008,7 +989,6 @@ class CommandObjectSettingsAppend : public CommandObjectRaw {
 
     if (argc < 2) {
       result.AppendError("'settings append' takes more arguments");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1016,7 +996,6 @@ class CommandObjectSettingsAppend : public CommandObjectRaw {
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError("'settings append' command requires a valid variable "
                          "name; No value supplied");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1031,7 +1010,6 @@ class CommandObjectSettingsAppend : public CommandObjectRaw {
         &m_exe_ctx, eVarSetOperationAppend, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1117,7 +1095,6 @@ class CommandObjectSettingsClear : public CommandObjectParsed {
     if (m_options.m_clear_all) {
       if (argc != 0) {
         result.AppendError("'settings clear --all' doesn't take any arguments");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       GetDebugger().GetValueProperties()->Clear();
@@ -1126,7 +1103,6 @@ class CommandObjectSettingsClear : public CommandObjectParsed {
 
     if (argc != 1) {
       result.AppendError("'settings clear' takes exactly one argument");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1134,7 +1110,6 @@ class CommandObjectSettingsClear : public CommandObjectParsed {
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError("'settings clear' command requires a valid variable "
                          "name; No value supplied");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1142,7 +1117,6 @@ class CommandObjectSettingsClear : public CommandObjectParsed {
         &m_exe_ctx, eVarSetOperationClear, var_name, llvm::StringRef()));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 

diff  --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 8fff22a06366c..7a0338e35bc7f 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -541,7 +541,6 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
     if (argc != 0) {
       result.AppendErrorWithFormat("'%s' takes no arguments, only flags.\n",
                                    GetCommandName().str().c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -551,7 +550,6 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
       if (target == nullptr) {
         result.AppendError("invalid target, create a debug target using the "
                            "'target create' command.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -575,12 +573,10 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
       }
       if (!m_module_list.GetSize()) {
         result.AppendError("No modules match the input.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else if (target->GetImages().GetSize() == 0) {
       result.AppendError("The target has no associated executable images.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -811,7 +807,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
           result.AppendErrorWithFormat("Could not find line information for "
                                        "start of function: \"%s\".\n",
                                        source_info.function.GetCString());
-          result.SetStatus(eReturnStatusFailed);
           return 0;
         }
         sc.function->GetEndLineSourceInfo(end_file, end_line);
@@ -933,7 +928,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
     if (argc != 0) {
       result.AppendErrorWithFormat("'%s' takes no arguments, only flags.\n",
                                    GetCommandName().str().c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -971,7 +965,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
       if (num_matches == 0) {
         result.AppendErrorWithFormat("Could not find function named: \"%s\".\n",
                                      m_options.symbol_name.c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -1038,7 +1031,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
               "no modules have source information for file address 0x%" PRIx64
               ".\n",
               m_options.address);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       } else {
@@ -1061,7 +1053,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
                                            "is no line table information "
                                            "available for this address.\n",
                                            error_strm.GetData());
-              result.SetStatus(eReturnStatusFailed);
               return false;
             }
           }
@@ -1071,7 +1062,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
           result.AppendErrorWithFormat(
               "no modules contain load address 0x%" PRIx64 ".\n",
               m_options.address);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
@@ -1191,7 +1181,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
       if (num_matches == 0) {
         result.AppendErrorWithFormat("Could not find source file \"%s\".\n",
                                      m_options.file_name.c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -1215,7 +1204,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
           result.AppendErrorWithFormat(
               "Multiple source files found matching: \"%s.\"\n",
               m_options.file_name.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
@@ -1245,7 +1233,6 @@ class CommandObjectSourceList : public CommandObjectParsed {
         } else {
           result.AppendErrorWithFormat("No comp unit found for: \"%s.\"\n",
                                        m_options.file_name.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }

diff  --git a/lldb/source/Commands/CommandObjectStats.cpp b/lldb/source/Commands/CommandObjectStats.cpp
index 6b06581f5a8f2..23c7dbbaf3730 100644
--- a/lldb/source/Commands/CommandObjectStats.cpp
+++ b/lldb/source/Commands/CommandObjectStats.cpp
@@ -28,7 +28,6 @@ class CommandObjectStatsEnable : public CommandObjectParsed {
 
     if (target.GetCollectingStats()) {
       result.AppendError("statistics already enabled");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -53,7 +52,6 @@ class CommandObjectStatsDisable : public CommandObjectParsed {
 
     if (!target.GetCollectingStats()) {
       result.AppendError("need to enable statistics before disabling them");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 

diff  --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 1df2bca98aa7d..e3591e713ea8e 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -278,7 +278,6 @@ class CommandObjectTargetCreate : public CommandObjectParsed {
         result.AppendErrorWithFormatv("Cannot open '{0}': {1}.",
                                       core_file.GetPath(),
                                       llvm::toString(file.takeError()));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -293,7 +292,6 @@ class CommandObjectTargetCreate : public CommandObjectParsed {
           result.AppendErrorWithFormatv("Cannot open '{0}': {1}.",
                                         symfile.GetPath(),
                                         llvm::toString(file.takeError()));
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
@@ -366,13 +364,11 @@ class CommandObjectTargetCreate : public CommandObjectParsed {
               // make up a local file
               result.AppendError("remote --> local transfer without local "
                                  "path is not implemented yet");
-              result.SetStatus(eReturnStatusFailed);
               return false;
             }
           }
         } else {
           result.AppendError("no platform found for target");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
@@ -414,7 +410,6 @@ class CommandObjectTargetCreate : public CommandObjectParsed {
           if (error.Fail()) {
             result.AppendError(
                 error.AsCString("can't find plug-in for core file"));
-            result.SetStatus(eReturnStatusFailed);
             return false;
           } else {
             result.AppendMessageWithFormatv(
@@ -427,7 +422,6 @@ class CommandObjectTargetCreate : public CommandObjectParsed {
           result.AppendErrorWithFormatv(
               "Unable to find process plug-in for core file '{0}'\n",
               core_file.GetPath());
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         result.AppendMessageWithFormat(
@@ -441,7 +435,6 @@ class CommandObjectTargetCreate : public CommandObjectParsed {
       result.AppendErrorWithFormat("'%s' takes exactly one executable path "
                                    "argument, or use the --core option.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -482,7 +475,6 @@ class CommandObjectTargetList : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendError("the 'target list' command takes no arguments\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -524,17 +516,14 @@ class CommandObjectTargetSelect : public CommandObjectParsed {
                 "index %u is out of range since there are no active targets\n",
                 target_idx);
           }
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         result.AppendErrorWithFormat("invalid index string value '%s'\n",
                                      target_idx_arg);
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError(
           "'target select' takes a single argument: a target index\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -584,7 +573,6 @@ class CommandObjectTargetDelete : public CommandObjectParsed {
       // Bail out if don't have any targets.
       if (num_targets == 0) {
         result.AppendError("no targets to delete");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -593,7 +581,6 @@ class CommandObjectTargetDelete : public CommandObjectParsed {
         if (entry.ref().getAsInteger(0, target_idx)) {
           result.AppendErrorWithFormat("invalid target index '%s'\n",
                                        entry.c_str());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         if (target_idx < num_targets) {
@@ -612,14 +599,12 @@ class CommandObjectTargetDelete : public CommandObjectParsed {
               "target index %u is out of range, the only valid index is 0\n",
               target_idx);
 
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
       target_sp = target_list.GetSelectedTarget();
       if (!target_sp) {
         result.AppendErrorWithFormat("no target is currently selected\n");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       delete_target_list.push_back(target_sp);
@@ -852,7 +837,6 @@ class CommandObjectTargetVariable : public CommandObjectParsed {
           if (!regex.IsValid()) {
             result.GetErrorStream().Printf(
                 "error: invalid regular expression: '%s'\n", arg.c_str());
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
           use_var_name = true;
@@ -930,7 +914,6 @@ class CommandObjectTargetVariable : public CommandObjectParsed {
           } else
             result.AppendError("'target variable' takes one or more global "
                                "variable names as arguments\n");
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         SymbolContextList sc_list;
@@ -1053,7 +1036,6 @@ class CommandObjectTargetModulesSearchPathsAdd : public CommandObjectParsed {
     const size_t argc = command.GetArgumentCount();
     if (argc & 1) {
       result.AppendError("add requires an even number of arguments\n");
-      result.SetStatus(eReturnStatusFailed);
     } else {
       for (size_t i = 0; i < argc; i += 2) {
         const char *from = command.GetArgumentAtIndex(i);
@@ -1077,7 +1059,6 @@ class CommandObjectTargetModulesSearchPathsAdd : public CommandObjectParsed {
             result.AppendError("<path-prefix> can't be empty\n");
           else
             result.AppendError("<new-path-prefix> can't be empty\n");
-          result.SetStatus(eReturnStatusFailed);
         }
       }
     }
@@ -1185,7 +1166,6 @@ class CommandObjectTargetModulesSearchPathsInsert : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "<index> parameter is not an integer: '%s'.\n",
             command.GetArgumentAtIndex(0));
-        result.SetStatus(eReturnStatusFailed);
         return result.Succeeded();
       }
 
@@ -1207,13 +1187,11 @@ class CommandObjectTargetModulesSearchPathsInsert : public CommandObjectParsed {
             result.AppendError("<path-prefix> can't be empty\n");
           else
             result.AppendError("<new-path-prefix> can't be empty\n");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
     } else {
       result.AppendError("insert requires at least three arguments\n");
-      result.SetStatus(eReturnStatusFailed);
       return result.Succeeded();
     }
     return result.Succeeded();
@@ -1238,7 +1216,6 @@ class CommandObjectTargetModulesSearchPathsList : public CommandObjectParsed {
     Target *target = &GetSelectedTarget();
     if (command.GetArgumentCount() != 0) {
       result.AppendError("list takes no arguments\n");
-      result.SetStatus(eReturnStatusFailed);
       return result.Succeeded();
     }
 
@@ -1279,7 +1256,6 @@ class CommandObjectTargetModulesSearchPathsQuery : public CommandObjectParsed {
     Target *target = &GetSelectedTarget();
     if (command.GetArgumentCount() != 1) {
       result.AppendError("query requires one argument\n");
-      result.SetStatus(eReturnStatusFailed);
       return result.Succeeded();
     }
 
@@ -1899,7 +1875,6 @@ class CommandObjectTargetModulesDumpObjfile
                                             target->GetImages());
       if (num_dumped == 0) {
         result.AppendError("the target has no associated executable images");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       // Find the modules that match the basename or full path.
@@ -1924,7 +1899,6 @@ class CommandObjectTargetModulesDumpObjfile
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendError("no matching executable images found");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2043,7 +2017,6 @@ class CommandObjectTargetModulesDumpSymtab
         }
       } else {
         result.AppendError("the target has no associated executable images");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
@@ -2080,7 +2053,6 @@ class CommandObjectTargetModulesDumpSymtab
       result.SetStatus(eReturnStatusSuccessFinishResult);
     else {
       result.AppendError("no matching executable images found");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2118,7 +2090,6 @@ class CommandObjectTargetModulesDumpSections
       const size_t num_modules = target->GetImages().GetSize();
       if (num_modules == 0) {
         result.AppendError("the target has no associated executable images");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -2167,7 +2138,6 @@ class CommandObjectTargetModulesDumpSections
       result.SetStatus(eReturnStatusSuccessFinishResult);
     else {
       result.AppendError("no matching executable images found");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2197,7 +2167,6 @@ class CommandObjectTargetModulesDumpClangAST
     const size_t num_modules = module_list.GetSize();
     if (num_modules == 0) {
       result.AppendError("the target has no associated executable images");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2275,7 +2244,6 @@ class CommandObjectTargetModulesDumpSymfile
       const size_t num_modules = target_modules.GetSize();
       if (num_modules == 0) {
         result.AppendError("the target has no associated executable images");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       result.GetOutputStream().Format(
@@ -2315,7 +2283,6 @@ class CommandObjectTargetModulesDumpSymfile
       result.SetStatus(eReturnStatusSuccessFinishResult);
     else {
       result.AppendError("no matching executable images found");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2351,7 +2318,6 @@ class CommandObjectTargetModulesDumpLineTable
 
     if (command.GetArgumentCount() == 0) {
       result.AppendError("file option must be specified.");
-      result.SetStatus(eReturnStatusFailed);
       return result.Succeeded();
     } else {
       // Dump specified images (by basename or fullpath)
@@ -2388,7 +2354,6 @@ class CommandObjectTargetModulesDumpLineTable
       result.SetStatus(eReturnStatusSuccessFinishResult);
     else {
       result.AppendError("no source filenames matched any command arguments");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2534,7 +2499,6 @@ class CommandObjectTargetModulesAdd : public CommandObjectParsed {
                                            "or symbol file with UUID %s",
                                            strm.GetData());
             }
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
         } else {
@@ -2543,13 +2507,11 @@ class CommandObjectTargetModulesAdd : public CommandObjectParsed {
           result.AppendErrorWithFormat(
               "Unable to locate the executable or symbol file with UUID %s",
               strm.GetData());
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       } else {
         result.AppendError(
             "one or more executable image paths must be specified");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
@@ -2586,7 +2548,6 @@ class CommandObjectTargetModulesAdd : public CommandObjectParsed {
           result.SetStatus(eReturnStatusSuccessFinishResult);
         } else {
           std::string resolved_path = file_spec.GetPath();
-          result.SetStatus(eReturnStatusFailed);
           if (resolved_path != entry.ref()) {
             result.AppendErrorWithFormat(
                 "invalid module path '%s' with resolved path '%s'\n",
@@ -2684,12 +2645,10 @@ class CommandObjectTargetModulesLoad
         search_using_module_spec = false;
         result.AppendErrorWithFormat(
             "more than 1 module matched by name '%s'\n", arg_cstr);
-        result.SetStatus(eReturnStatusFailed);
       } else {
         search_using_module_spec = false;
         result.AppendErrorWithFormat("no object file for module '%s'\n",
                                      arg_cstr);
-        result.SetStatus(eReturnStatusFailed);
       }
     }
 
@@ -2723,7 +2682,6 @@ class CommandObjectTargetModulesLoad
                 } else {
                   result.AppendError("one or more section name + load "
                                      "address pair must be specified");
-                  result.SetStatus(eReturnStatusFailed);
                   return false;
                 }
               } else {
@@ -2731,7 +2689,6 @@ class CommandObjectTargetModulesLoad
                   result.AppendError("The \"--slide <offset>\" option can't "
                                      "be used in conjunction with setting "
                                      "section load addresses.\n");
-                  result.SetStatus(eReturnStatusFailed);
                   return false;
                 }
 
@@ -2750,7 +2707,6 @@ class CommandObjectTargetModulesLoad
                               "thread specific sections are not yet "
                               "supported (section '%s')\n",
                               sect_name);
-                          result.SetStatus(eReturnStatusFailed);
                           break;
                         } else {
                           if (target->GetSectionLoadList()
@@ -2765,13 +2721,11 @@ class CommandObjectTargetModulesLoad
                                                      "matches the section "
                                                      "name '%s'\n",
                                                      sect_name);
-                        result.SetStatus(eReturnStatusFailed);
                         break;
                       }
                     } else {
                       result.AppendErrorWithFormat(
                           "invalid load address string '%s'\n", load_addr_cstr);
-                      result.SetStatus(eReturnStatusFailed);
                       break;
                     }
                   } else {
@@ -2781,7 +2735,6 @@ class CommandObjectTargetModulesLoad
                     else
                       result.AppendError("one or more section name + load "
                                          "address pair must be specified.\n");
-                    result.SetStatus(eReturnStatusFailed);
                     break;
                   }
                 }
@@ -2824,7 +2777,6 @@ class CommandObjectTargetModulesLoad
                     result.AppendErrorWithFormat("failed to set PC value to "
                                                  "0x%" PRIx64 "\n",
                                                  file_entry_addr);
-                    result.SetStatus(eReturnStatusFailed);
                   }
                 }
               }
@@ -2832,13 +2784,11 @@ class CommandObjectTargetModulesLoad
               module->GetFileSpec().GetPath(path, sizeof(path));
               result.AppendErrorWithFormat("no sections in object file '%s'\n",
                                            path);
-              result.SetStatus(eReturnStatusFailed);
             }
           } else {
             module->GetFileSpec().GetPath(path, sizeof(path));
             result.AppendErrorWithFormat("no object file for module '%s'\n",
                                          path);
-            result.SetStatus(eReturnStatusFailed);
           }
         } else {
           FileSpec *module_spec_file = module_spec.GetFileSpecPtr();
@@ -2847,7 +2797,6 @@ class CommandObjectTargetModulesLoad
             result.AppendErrorWithFormat("invalid module '%s'.\n", path);
           } else
             result.AppendError("no module spec");
-          result.SetStatus(eReturnStatusFailed);
         }
       } else {
         std::string uuid_str;
@@ -2875,12 +2824,10 @@ class CommandObjectTargetModulesLoad
               path[0] ? " file=" : "", path, !uuid_str.empty() ? " uuid=" : "",
               uuid_str.c_str());
         }
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendError("either the \"--file <module>\" or the \"--uuid "
                          "<uuid>\" option must be specified.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     return result.Succeeded();
@@ -2963,7 +2910,6 @@ class CommandObjectTargetModulesList : public CommandObjectParsed {
     if (target == nullptr && !use_global_module_list) {
       result.AppendError("invalid target, create a debug target using the "
                          "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     } else {
       if (target) {
@@ -2987,18 +2933,15 @@ class CommandObjectTargetModulesList : public CommandObjectParsed {
               result.AppendErrorWithFormat(
                   "Couldn't find module matching address: 0x%" PRIx64 ".",
                   m_options.m_module_addr);
-              result.SetStatus(eReturnStatusFailed);
             }
           } else {
             result.AppendErrorWithFormat(
                 "Couldn't find module containing address: 0x%" PRIx64 ".",
                 m_options.m_module_addr);
-            result.SetStatus(eReturnStatusFailed);
           }
         } else {
           result.AppendError(
               "Can only look up modules by address with a valid target.");
-          result.SetStatus(eReturnStatusFailed);
         }
         return result.Succeeded();
       }
@@ -3030,7 +2973,6 @@ class CommandObjectTargetModulesList : public CommandObjectParsed {
             if (argc == 1) {
               result.AppendErrorWithFormat("no modules found that match '%s'",
                                            arg.c_str());
-              result.SetStatus(eReturnStatusFailed);
               return false;
             }
           }
@@ -3077,7 +3019,6 @@ class CommandObjectTargetModulesList : public CommandObjectParsed {
             result.AppendError(
                 "the target has no associated executable images");
         }
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -3326,21 +3267,18 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
     if (process == nullptr) {
       result.AppendError(
           "You must have a process running to use this command.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     ThreadList threads(process->GetThreadList());
     if (threads.GetSize() == 0) {
       result.AppendError("The process must be paused to use this command.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     ThreadSP thread(threads.GetThreadAtIndex(0));
     if (!thread) {
       result.AppendError("The process must be paused to use this command.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -3365,7 +3303,6 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
     } else {
       result.AppendError(
           "address-expression or function name option must be specified.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -3373,7 +3310,6 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
     if (num_matches == 0) {
       result.AppendErrorWithFormat("no unwind data found that matches '%s'.",
                                    m_options.m_str.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -3890,7 +3826,6 @@ class CommandObjectTargetModulesLookup : public CommandObjectParsed {
       std::lock_guard<std::recursive_mutex> guard(target_modules.GetMutex());
       if (target_modules.GetSize() == 0) {
         result.AppendError("the target has no associated executable images");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -4060,7 +3995,6 @@ class CommandObjectTargetSymbolsAdd : public CommandObjectParsed {
     if (!symbol_fspec) {
       result.AppendError(
           "one or more executable image paths must be specified");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -4142,7 +4076,6 @@ class CommandObjectTargetSymbolsAdd : public CommandObjectParsed {
                                    "use the --uuid option to resolve the "
                                    "ambiguity.\n",
                                    symfile_path);
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -4209,7 +4142,6 @@ class CommandObjectTargetSymbolsAdd : public CommandObjectParsed {
         !llvm::sys::fs::is_regular_file(symbol_fspec.GetPath())
             ? "\n       please specify the full path to the symbol file"
             : "");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -4773,7 +4705,6 @@ Filter Options:
         // FIXME: Set the stop hook ID counter back.
         result.AppendErrorWithFormat("Couldn't add stop hook: %s",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         target.UndoCreateStopHook(new_hook_sp->GetID());
         return false;
       }
@@ -4834,13 +4765,11 @@ class CommandObjectTargetStopHookDelete : public CommandObjectParsed {
         if (!llvm::to_integer(command.GetArgumentAtIndex(i), user_id)) {
           result.AppendErrorWithFormat("invalid stop hook id: \"%s\".\n",
                                        command.GetArgumentAtIndex(i));
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         if (!target.RemoveStopHookByID(user_id)) {
           result.AppendErrorWithFormat("unknown stop hook id: \"%s\".\n",
                                        command.GetArgumentAtIndex(i));
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }
@@ -4889,14 +4818,12 @@ class CommandObjectTargetStopHookEnableDisable : public CommandObjectParsed {
         if (!llvm::to_integer(command.GetArgumentAtIndex(i), user_id)) {
           result.AppendErrorWithFormat("invalid stop hook id: \"%s\".\n",
                                        command.GetArgumentAtIndex(i));
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         success = target.SetStopHookActiveStateByID(user_id, m_enable);
         if (!success) {
           result.AppendErrorWithFormat("unknown stop hook id: \"%s\".\n",
                                        command.GetArgumentAtIndex(i));
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       }

diff  --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 7e4709b33cc12..98ace0c7aa11e 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -154,7 +154,6 @@ class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads {
       result.AppendErrorWithFormat(
           "thread disappeared while computing backtraces: 0x%" PRIx64 "\n",
           tid);
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -173,7 +172,6 @@ class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads {
       result.AppendErrorWithFormat(
           "error displaying backtrace for thread: \"0x%4.4x\"\n",
           thread->GetIndexID());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     if (m_options.m_extended_backtrace) {
@@ -385,7 +383,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
 
       if (thread == nullptr) {
         result.AppendError("no selected thread in process");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
@@ -395,7 +392,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
       if (!llvm::to_integer(thread_idx_cstr, step_thread_idx)) {
         result.AppendErrorWithFormat("invalid thread index '%s'.\n",
                                      thread_idx_cstr);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       thread =
@@ -404,7 +400,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "Thread index %u is out of range (valid values are 0 - %u).\n",
             step_thread_idx, num_threads);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -412,14 +407,12 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
     if (m_step_type == eStepTypeScripted) {
       if (m_class_options.GetName().empty()) {
         result.AppendErrorWithFormat("empty class name for scripted step.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       } else if (!GetDebugger().GetScriptInterpreter()->CheckObjectExists(
                      m_class_options.GetName().c_str())) {
         result.AppendErrorWithFormat(
             "class for scripted step: \"%s\" does not exist.",
             m_class_options.GetName().c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -428,7 +421,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
         m_step_type != eStepTypeInto) {
       result.AppendErrorWithFormat(
           "end line option is only valid for step into");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -461,7 +453,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
                                                    error)) {
             result.AppendErrorWithFormat("invalid end-line option: %s.",
                                          error.AsCString());
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
         } else if (m_options.m_end_line_is_block_end) {
@@ -469,7 +460,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
           Block *block = frame->GetSymbolContext(eSymbolContextBlock).block;
           if (!block) {
             result.AppendErrorWithFormat("Could not find the current block.");
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
 
@@ -479,7 +469,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
           if (!block_range.GetBaseAddress().IsValid()) {
             result.AppendErrorWithFormat(
                 "Could not find the current block address.");
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
           lldb::addr_t pc_offset_in_block =
@@ -538,7 +527,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
           new_plan_status);
     } else {
       result.AppendError("step type is not supported");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -570,7 +558,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
 
       if (!error.Success()) {
         result.AppendMessage(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -594,7 +581,6 @@ class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
       }
     } else {
       result.SetError(new_plan_status);
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -650,7 +636,6 @@ class CommandObjectThreadContinue : public CommandObjectParsed {
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
       result.AppendError("no process exists. Cannot continue");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -671,7 +656,6 @@ class CommandObjectThreadContinue : public CommandObjectParsed {
           if (entry.ref().getAsInteger(0, thread_idx)) {
             result.AppendErrorWithFormat(
                 "invalid thread index argument: \"%s\".\n", entry.c_str());
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
           Thread *thread =
@@ -682,14 +666,12 @@ class CommandObjectThreadContinue : public CommandObjectParsed {
           } else {
             result.AppendErrorWithFormat("invalid thread index %u.\n",
                                          thread_idx);
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
         }
 
         if (resume_threads.empty()) {
           result.AppendError("no valid thread indexes were specified");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         } else {
           if (resume_threads.size() == 1)
@@ -729,7 +711,6 @@ class CommandObjectThreadContinue : public CommandObjectParsed {
         Thread *current_thread = GetDefaultThread();
         if (current_thread == nullptr) {
           result.AppendError("the process doesn't have a current thread");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         // Set the actions that the threads should each take when resuming
@@ -772,13 +753,11 @@ class CommandObjectThreadContinue : public CommandObjectParsed {
       } else {
         result.AppendErrorWithFormat("Failed to resume process: %s\n",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       result.AppendErrorWithFormat(
           "Process cannot be continued from its current state (%s).\n",
           StateAsCString(state));
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -916,7 +895,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
       result.AppendError("need a valid process to step");
-      result.SetStatus(eReturnStatusFailed);
     } else {
       Thread *thread = nullptr;
       std::vector<uint32_t> line_numbers;
@@ -928,7 +906,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
           if (!llvm::to_integer(command.GetArgumentAtIndex(i), line_number)) {
             result.AppendErrorWithFormat("invalid line number: '%s'.\n",
                                          command.GetArgumentAtIndex(i));
-            result.SetStatus(eReturnStatusFailed);
             return false;
           } else
             line_numbers.push_back(line_number);
@@ -936,7 +913,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
       } else if (m_options.m_until_addrs.empty()) {
         result.AppendErrorWithFormat("No line number or address provided:\n%s",
                                      GetSyntax().str().c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -953,7 +929,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "Thread index %u is out of range (valid values are 0 - %u).\n",
             m_options.m_thread_idx, num_threads);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -965,7 +940,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "Frame index %u is out of range for thread %u.\n",
             m_options.m_frame_idx, m_options.m_thread_idx);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -985,7 +959,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
                                        "frame %u of thread index %u.\n",
                                        m_options.m_frame_idx,
                                        m_options.m_thread_idx);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
 
@@ -1045,7 +1018,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
             result.AppendErrorWithFormat(
                 "Until target outside of the current function.\n");
 
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
 
@@ -1061,14 +1033,12 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
           new_plan_sp->SetOkayToDiscard(false);
         } else {
           result.SetError(new_plan_status);
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
       } else {
         result.AppendErrorWithFormat(
             "Frame index %u of thread %u has no debug information.\n",
             m_options.m_frame_idx, m_options.m_thread_idx);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -1098,7 +1068,6 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
       } else {
         result.AppendErrorWithFormat("Failed to resume process: %s.\n",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       }
     }
     return result.Succeeded();
@@ -1150,13 +1119,11 @@ class CommandObjectThreadSelect : public CommandObjectParsed {
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
       result.AppendError("no process");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     } else if (command.GetArgumentCount() != 1) {
       result.AppendErrorWithFormat(
           "'%s' takes exactly one thread index argument:\nUsage: %s\n",
           m_cmd_name.c_str(), m_cmd_syntax.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1164,7 +1131,6 @@ class CommandObjectThreadSelect : public CommandObjectParsed {
     if (!llvm::to_integer(command.GetArgumentAtIndex(0), index_id)) {
       result.AppendErrorWithFormat("Invalid thread index '%s'",
                                    command.GetArgumentAtIndex(0));
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1173,7 +1139,6 @@ class CommandObjectThreadSelect : public CommandObjectParsed {
     if (new_thread == nullptr) {
       result.AppendErrorWithFormat("invalid thread #%s.\n",
                                    command.GetArgumentAtIndex(0));
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1292,7 +1257,6 @@ class CommandObjectThreadInfo : public CommandObjectIterateOverThreads {
     if (!thread_sp) {
       result.AppendErrorWithFormat("thread no longer exists: 0x%" PRIx64 "\n",
                                    tid);
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1304,7 +1268,6 @@ class CommandObjectThreadInfo : public CommandObjectIterateOverThreads {
                                 m_options.m_json_stopinfo)) {
       result.AppendErrorWithFormat("error displaying info for thread: \"%d\"\n",
                                    thread->GetIndexID());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     return true;
@@ -1342,7 +1305,6 @@ class CommandObjectThreadException : public CommandObjectIterateOverThreads {
     if (!thread_sp) {
       result.AppendErrorWithFormat("thread no longer exists: 0x%" PRIx64 "\n",
                                    tid);
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1465,7 +1427,6 @@ class CommandObjectThreadReturn : public CommandObjectRaw {
       if (!error.Success()) {
         result.AppendErrorWithFormat("Unwinding expression failed - %s.",
                                      error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
       } else {
         bool success =
             thread->SetSelectedFrameByIndexNoisily(0, result.GetOutputStream());
@@ -1475,7 +1436,6 @@ class CommandObjectThreadReturn : public CommandObjectRaw {
         } else {
           result.AppendErrorWithFormat(
               "Could not select 0th frame after unwinding expression.");
-          result.SetStatus(eReturnStatusFailed);
         }
       }
       return result.Succeeded();
@@ -1488,7 +1448,6 @@ class CommandObjectThreadReturn : public CommandObjectRaw {
 
     if (frame_sp->IsInlined()) {
       result.AppendError("Don't know how to return from inlined frames.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1510,7 +1469,6 @@ class CommandObjectThreadReturn : public CommandObjectRaw {
         else
           result.AppendErrorWithFormat(
               "Unknown error evaluating result expression.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1523,7 +1481,6 @@ class CommandObjectThreadReturn : public CommandObjectRaw {
       result.AppendErrorWithFormat(
           "Error returning from frame %d of thread %d: %s.", frame_idx,
           thread_sp->GetIndexID(), error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1625,14 +1582,12 @@ class CommandObjectThreadJump : public CommandObjectParsed {
       lldb::addr_t callAddr = dest.GetCallableLoadAddress(target);
       if (callAddr == LLDB_INVALID_ADDRESS) {
         result.AppendErrorWithFormat("Invalid destination address.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
       if (!reg_ctx->SetPC(callAddr)) {
         result.AppendErrorWithFormat("Error changing PC value for thread %d.",
                                      thread->GetIndexID());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
@@ -1649,7 +1604,6 @@ class CommandObjectThreadJump : public CommandObjectParsed {
       if (!file) {
         result.AppendErrorWithFormat(
             "No source file available for the current location.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -1776,7 +1730,6 @@ class CommandObjectThreadPlanList : public CommandObjectIterateOverThreads {
           if (!success) {
             result.SetError("Error dumping plans:");
             result.AppendError(tmp_strm.GetString());
-            result.SetStatus(eReturnStatusFailed);
             return false;
           }
           // Otherwise, add our data to the output:
@@ -1853,7 +1806,6 @@ class CommandObjectThreadPlanDiscard : public CommandObjectParsed {
       result.AppendErrorWithFormat("Too many arguments, expected one - the "
                                    "thread plan index - but got %zu.",
                                    args.GetArgumentCount());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1862,14 +1814,12 @@ class CommandObjectThreadPlanDiscard : public CommandObjectParsed {
       result.AppendErrorWithFormat(
           "Invalid thread index: \"%s\" - should be unsigned int.",
           args.GetArgumentAtIndex(0));
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     if (thread_plan_idx == 0) {
       result.AppendErrorWithFormat(
           "You wouldn't really want me to discard the base thread plan.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1880,7 +1830,6 @@ class CommandObjectThreadPlanDiscard : public CommandObjectParsed {
       result.AppendErrorWithFormat(
           "Could not find User thread plan with index %s.",
           args.GetArgumentAtIndex(0));
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -1936,13 +1885,11 @@ class CommandObjectThreadPlanPrune : public CommandObjectParsed {
       if (!llvm::to_integer(args.GetArgumentAtIndex(i), tid)) {
         result.AppendErrorWithFormat("invalid thread specification: \"%s\"\n",
                                      args.GetArgumentAtIndex(i));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       if (!process->PruneThreadPlansForTID(tid)) {
         result.AppendErrorWithFormat("Could not find unreported tid: \"%s\"\n",
                                      args.GetArgumentAtIndex(i));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }

diff  --git a/lldb/source/Commands/CommandObjectThreadUtil.cpp b/lldb/source/Commands/CommandObjectThreadUtil.cpp
index b395f2d38b45a..d330da7e684ea 100644
--- a/lldb/source/Commands/CommandObjectThreadUtil.cpp
+++ b/lldb/source/Commands/CommandObjectThreadUtil.cpp
@@ -58,7 +58,6 @@ bool CommandObjectIterateOverThreads::DoExecute(Args &command,
       if (!llvm::to_integer(command.GetArgumentAtIndex(i), thread_idx)) {
         result.AppendErrorWithFormat("invalid thread specification: \"%s\"\n",
                                      command.GetArgumentAtIndex(i));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -68,7 +67,6 @@ bool CommandObjectIterateOverThreads::DoExecute(Args &command,
       if (!thread) {
         result.AppendErrorWithFormat("no thread with index: \"%s\"\n",
                                      command.GetArgumentAtIndex(i));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -129,7 +127,6 @@ bool CommandObjectIterateOverThreads::BucketThread(
   Thread *thread = process->GetThreadList().FindThreadByID(tid).get();
   if (thread == nullptr) {
     result.AppendErrorWithFormatv("Failed to process thread #{0}.\n", tid);
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -181,7 +178,6 @@ bool CommandObjectMultipleThreads::DoExecute(Args &command,
       if (!llvm::to_integer(command.GetArgumentAtIndex(i), thread_idx)) {
         result.AppendErrorWithFormat("invalid thread specification: \"%s\"\n",
                                      command.GetArgumentAtIndex(i));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -190,7 +186,6 @@ bool CommandObjectMultipleThreads::DoExecute(Args &command,
       if (!thread) {
         result.AppendErrorWithFormat("no thread with index: \"%s\"\n",
                                      command.GetArgumentAtIndex(i));
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 

diff  --git a/lldb/source/Commands/CommandObjectTrace.cpp b/lldb/source/Commands/CommandObjectTrace.cpp
index b151a4dc80559..e17ae82a10ff2 100644
--- a/lldb/source/Commands/CommandObjectTrace.cpp
+++ b/lldb/source/Commands/CommandObjectTrace.cpp
@@ -87,14 +87,12 @@ class CommandObjectTraceLoad : public CommandObjectParsed {
       result.AppendError(
           "a single path to a JSON file containing a trace session"
           "is required");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     auto end_with_failure = [&result](llvm::Error err) -> bool {
       result.AppendErrorWithFormat("%s\n",
                                    llvm::toString(std::move(err)).c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     };
 
@@ -190,7 +188,6 @@ class CommandObjectTraceDump : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendErrorWithFormat("%s\n", error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -281,7 +278,6 @@ class CommandObjectTraceSchema : public CommandObjectParsed {
       result.SetStatus(eReturnStatusSuccessFinishResult);
     } else {
       result.AppendErrorWithFormat("%s\n", error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }

diff  --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 025d9eadd2ae3..29efe1e041996 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -377,7 +377,6 @@ class CommandObjectTypeSynthAdd : public CommandObjectParsed,
       result.AppendError("must either provide a children list, a Python class "
                          "name, or use -P and type a Python class "
                          "line-by-line");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -639,7 +638,6 @@ pointers to floats.  Nor will it change the default display for Afloat and Bfloa
     if (argc < 1) {
       result.AppendErrorWithFormat("%s takes one or more args.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -648,7 +646,6 @@ pointers to floats.  Nor will it change the default display for Afloat and Bfloa
         m_command_options.m_custom_type_name.empty()) {
       result.AppendErrorWithFormat("%s needs a valid format.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -681,7 +678,6 @@ pointers to floats.  Nor will it change the default display for Afloat and Bfloa
     for (auto &arg_entry : command.entries()) {
       if (arg_entry.ref().empty()) {
         result.AppendError("empty typenames not allowed");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -691,7 +687,6 @@ pointers to floats.  Nor will it change the default display for Afloat and Bfloa
         if (!typeRX.IsValid()) {
           result.AppendError(
               "regex format error (maybe this is not really a regex?)");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         category_sp->GetRegexTypeSummariesContainer()->Delete(typeCS);
@@ -821,7 +816,6 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
 
     if (argc != 1) {
       result.AppendErrorWithFormat("%s takes 1 arg.\n", m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -830,7 +824,6 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
 
     if (!typeCS) {
       result.AppendError("empty typenames not allowed");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -868,7 +861,6 @@ class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
       return result.Succeeded();
     } else {
       result.AppendErrorWithFormat("no custom formatter for %s.\n", typeA);
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -1073,7 +1065,6 @@ class CommandObjectTypeFormatterList : public CommandObjectParsed {
         result.AppendErrorWithFormat(
             "syntax error in category regular expression '%s'",
             m_options.m_category_regex.GetCurrentValueAsRef().str().c_str());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1084,7 +1075,6 @@ class CommandObjectTypeFormatterList : public CommandObjectParsed {
       if (!formatter_regex->IsValid()) {
         result.AppendErrorWithFormat("syntax error in regular expression '%s'",
                                      arg);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -1293,7 +1283,6 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
   if (argc < 1 && !m_options.m_name) {
     result.AppendErrorWithFormat("%s takes one or more args.\n",
                                  m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -1305,7 +1294,6 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
     const char *funct_name = m_options.m_python_function.c_str();
     if (!funct_name || !funct_name[0]) {
       result.AppendError("function name empty.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1329,7 +1317,6 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
     if (!interpreter) {
       result.AppendError("script interpreter missing - unable to generate "
                          "function wrapper.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     StringList funct_sl;
@@ -1337,13 +1324,11 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
     std::string funct_name_str;
     if (!interpreter->GenerateTypeScriptFunction(funct_sl, funct_name_str)) {
       result.AppendError("unable to generate function wrapper.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     if (funct_name_str.empty()) {
       result.AppendError(
           "script interpreter failed to generate a valid function name.\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1360,7 +1345,6 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
     for (auto &entry : command.entries()) {
       if (entry.ref().empty()) {
         result.AppendError("empty typenames not allowed");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -1389,7 +1373,6 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
         m_options.m_category, &error);
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -1400,7 +1383,6 @@ bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
     if (error.Fail()) {
       result.AppendError(error.AsCString());
       result.AppendError("added to types, but not given a name");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -1417,14 +1399,12 @@ bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
   if (argc < 1 && !m_options.m_name) {
     result.AppendErrorWithFormat("%s takes one or more args.\n",
                                  m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
   if (!m_options.m_flags.GetShowMembersOneLiner() &&
       m_options.m_format_string.empty()) {
     result.AppendError("empty summary strings not allowed");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -1435,7 +1415,6 @@ bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
   // ${var%S} is an endless recursion, prevent it
   if (strcmp(format_cstr, "${var%S}") == 0) {
     result.AppendError("recursive summary not allowed");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -1443,13 +1422,11 @@ bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
       new StringSummaryFormat(m_options.m_flags, format_cstr));
   if (!string_format) {
     result.AppendError("summary creation failed");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
   if (string_format->m_error.Fail()) {
     result.AppendErrorWithFormat("syntax error: %s",
                                  string_format->m_error.AsCString("<unknown>"));
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
   lldb::TypeSummaryImplSP entry(string_format.release());
@@ -1459,7 +1436,6 @@ bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
   for (auto &arg_entry : command.entries()) {
     if (arg_entry.ref().empty()) {
       result.AppendError("empty typenames not allowed");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
     ConstString typeCS(arg_entry.ref());
@@ -1470,7 +1446,6 @@ bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
 
     if (error.Fail()) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -1481,7 +1456,6 @@ bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
     if (error.Fail()) {
       result.AppendError(error.AsCString());
       result.AppendError("added to types, but not given a name");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -1610,7 +1584,6 @@ bool CommandObjectTypeSummaryAdd::DoExecute(Args &command,
     return Execute_ScriptSummary(command, result);
 #else
     result.AppendError("python is disabled");
-    result.SetStatus(eReturnStatusFailed);
     return false;
 #endif
   }
@@ -1817,7 +1790,6 @@ class CommandObjectTypeCategoryDefine : public CommandObjectParsed {
     if (argc < 1) {
       result.AppendErrorWithFormat("%s takes 1 or more args.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1921,7 +1893,6 @@ class CommandObjectTypeCategoryEnable : public CommandObjectParsed {
     if (argc < 1 && m_options.m_language == lldb::eLanguageTypeUnknown) {
       result.AppendErrorWithFormat("%s takes arguments and/or a language",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -1934,7 +1905,6 @@ class CommandObjectTypeCategoryEnable : public CommandObjectParsed {
 
         if (!typeCS) {
           result.AppendError("empty category name not allowed");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         DataVisualization::Categories::Enable(typeCS);
@@ -1991,7 +1961,6 @@ class CommandObjectTypeCategoryDelete : public CommandObjectParsed {
     if (argc < 1) {
       result.AppendErrorWithFormat("%s takes 1 or more arg.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2004,7 +1973,6 @@ class CommandObjectTypeCategoryDelete : public CommandObjectParsed {
 
       if (!typeCS) {
         result.AppendError("empty category name not allowed");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
       if (!DataVisualization::Categories::Delete(typeCS))
@@ -2015,7 +1983,6 @@ class CommandObjectTypeCategoryDelete : public CommandObjectParsed {
       return result.Succeeded();
     } else {
       result.AppendError("cannot delete one or more categories\n");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -2104,7 +2071,6 @@ class CommandObjectTypeCategoryDisable : public CommandObjectParsed {
     if (argc < 1 && m_options.m_language == lldb::eLanguageTypeUnknown) {
       result.AppendErrorWithFormat("%s takes arguments and/or a language",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2118,7 +2084,6 @@ class CommandObjectTypeCategoryDisable : public CommandObjectParsed {
 
         if (!typeCS) {
           result.AppendError("empty category name not allowed");
-          result.SetStatus(eReturnStatusFailed);
           return false;
         }
         DataVisualization::Categories::Disable(typeCS);
@@ -2176,13 +2141,11 @@ class CommandObjectTypeCategoryList : public CommandObjectParsed {
       if (!regex->IsValid()) {
         result.AppendErrorWithFormat(
             "syntax error in category regular expression '%s'", arg);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else if (argc != 0) {
       result.AppendErrorWithFormat("%s takes 0 or one arg.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2300,7 +2263,6 @@ bool CommandObjectTypeSynthAdd::Execute_HandwritePython(
   for (auto &entry : command.entries()) {
     if (entry.ref().empty()) {
       result.AppendError("empty typenames not allowed");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2323,7 +2285,6 @@ bool CommandObjectTypeSynthAdd::Execute_PythonClass(
   if (argc < 1) {
     result.AppendErrorWithFormat("%s takes one or more args.\n",
                                  m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -2331,7 +2292,6 @@ bool CommandObjectTypeSynthAdd::Execute_PythonClass(
     result.AppendErrorWithFormat("%s needs either a Python class name or -P to "
                                  "directly input Python code.\n",
                                  m_cmd_name.c_str());
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
 
@@ -2364,7 +2324,6 @@ bool CommandObjectTypeSynthAdd::Execute_PythonClass(
   for (auto &arg_entry : command.entries()) {
     if (arg_entry.ref().empty()) {
       result.AppendError("empty typenames not allowed");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2373,7 +2332,6 @@ bool CommandObjectTypeSynthAdd::Execute_PythonClass(
                   m_options.m_regex ? eRegexSynth : eRegularSynth,
                   m_options.m_category, &error)) {
       result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
   }
@@ -2628,14 +2586,12 @@ all children of my_foo as if no filter was defined:"
     if (argc < 1) {
       result.AppendErrorWithFormat("%s takes one or more args.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     if (m_options.m_expr_paths.empty()) {
       result.AppendErrorWithFormat("%s needs one or more children.\n",
                                    m_cmd_name.c_str());
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -2665,7 +2621,6 @@ all children of my_foo as if no filter was defined:"
     for (auto &arg_entry : command.entries()) {
       if (arg_entry.ref().empty()) {
         result.AppendError("empty typenames not allowed");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -2674,7 +2629,6 @@ all children of my_foo as if no filter was defined:"
                      m_options.m_regex ? eRegexFilter : eRegularFilter,
                      m_options.m_category, &error)) {
         result.AppendError(error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -2921,7 +2875,6 @@ class CommandObjectFormatterInfo : public CommandObjectRaw {
     Thread *thread = GetDefaultThread();
     if (!thread) {
       result.AppendError("no default thread");
-      result.SetStatus(lldb::eReturnStatusFailed);
       return false;
     }
 
@@ -2954,7 +2907,6 @@ class CommandObjectFormatterInfo : public CommandObjectRaw {
       return true;
     } else {
       result.AppendError("failed to evaluate expression");
-      result.SetStatus(lldb::eReturnStatusFailed);
       return false;
     }
   }

diff  --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index b8be19f385233..a426b382e1212 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -42,7 +42,6 @@ static bool CheckTargetForWatchpointOperations(Target *target,
       target->GetProcessSP() && target->GetProcessSP()->IsAlive();
   if (!process_is_valid) {
     result.AppendError("There's no process or it is not alive.");
-    result.SetStatus(eReturnStatusFailed);
     return false;
   }
   // Target passes our checks, return true.
@@ -248,7 +247,6 @@ class CommandObjectWatchpointList : public CommandObjectParsed {
       if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(
               target, command, wp_ids)) {
         result.AppendError("Invalid watchpoints specification.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -311,7 +309,6 @@ class CommandObjectWatchpointEnable : public CommandObjectParsed {
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist to be enabled.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -328,7 +325,6 @@ class CommandObjectWatchpointEnable : public CommandObjectParsed {
       if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(
               target, command, wp_ids)) {
         result.AppendError("Invalid watchpoints specification.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -388,7 +384,6 @@ class CommandObjectWatchpointDisable : public CommandObjectParsed {
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist to be disabled.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -401,7 +396,6 @@ class CommandObjectWatchpointDisable : public CommandObjectParsed {
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
       } else {
         result.AppendError("Disable all watchpoints failed\n");
-        result.SetStatus(eReturnStatusFailed);
       }
     } else {
       // Particular watchpoints selected; disable them.
@@ -409,7 +403,6 @@ class CommandObjectWatchpointDisable : public CommandObjectParsed {
       if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(
               target, command, wp_ids)) {
         result.AppendError("Invalid watchpoints specification.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -509,7 +502,6 @@ class CommandObjectWatchpointDelete : public CommandObjectParsed {
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist to be deleted.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -534,7 +526,6 @@ class CommandObjectWatchpointDelete : public CommandObjectParsed {
     if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(target, command,
                                                                wp_ids)) {
       result.AppendError("Invalid watchpoints specification.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -639,7 +630,6 @@ class CommandObjectWatchpointIgnore : public CommandObjectParsed {
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist to be ignored.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -655,7 +645,6 @@ class CommandObjectWatchpointIgnore : public CommandObjectParsed {
       if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(
               target, command, wp_ids)) {
         result.AppendError("Invalid watchpoints specification.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -768,7 +757,6 @@ class CommandObjectWatchpointModify : public CommandObjectParsed {
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist to be modified.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -782,7 +770,6 @@ class CommandObjectWatchpointModify : public CommandObjectParsed {
       if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(
               target, command, wp_ids)) {
         result.AppendError("Invalid watchpoints specification.");
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
@@ -889,10 +876,8 @@ corresponding to the byte size of the data type.");
     // If no argument is present, issue an error message.  There's no way to
     // set a watchpoint.
     if (command.GetArgumentCount() <= 0) {
-      result.GetErrorStream().Printf("error: required argument missing; "
-                                     "specify your program variable to watch "
-                                     "for\n");
-      result.SetStatus(eReturnStatusFailed);
+      result.AppendError("required argument missing; "
+                         "specify your program variable to watch for");
       return false;
     }
 
@@ -912,9 +897,7 @@ corresponding to the byte size of the data type.");
 
     // A simple watch variable gesture allows only one argument.
     if (command.GetArgumentCount() != 1) {
-      result.GetErrorStream().Printf(
-          "error: specify exactly one variable to watch for\n");
-      result.SetStatus(eReturnStatusFailed);
+      result.AppendError("specify exactly one variable to watch for");
       return false;
     }
 
@@ -993,7 +976,6 @@ corresponding to the byte size of the data type.");
           addr, (uint64_t)size, command.GetArgumentAtIndex(0));
       if (error.AsCString(nullptr))
         result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();
@@ -1161,7 +1143,6 @@ class CommandObjectWatchpointSetExpression : public CommandObjectRaw {
                                    addr, (uint64_t)size);
       if (error.AsCString(nullptr))
         result.AppendError(error.AsCString());
-      result.SetStatus(eReturnStatusFailed);
     }
 
     return result.Succeeded();

diff  --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 432ba447a41b2..1f4e953663857 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -404,7 +404,6 @@ are no syntax errors may indicate that a function was declared but never called.
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist to have commands added");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -419,7 +418,6 @@ are no syntax errors may indicate that a function was declared but never called.
     if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(target, command,
                                                                valid_wp_ids)) {
       result.AppendError("Invalid watchpoints specification.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -514,14 +512,12 @@ class CommandObjectWatchpointCommandDelete : public CommandObjectParsed {
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist to have commands deleted");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     if (command.GetArgumentCount() == 0) {
       result.AppendError(
           "No watchpoint specified from which to delete the commands");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -529,7 +525,6 @@ class CommandObjectWatchpointCommandDelete : public CommandObjectParsed {
     if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(target, command,
                                                                valid_wp_ids)) {
       result.AppendError("Invalid watchpoints specification.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -543,7 +538,6 @@ class CommandObjectWatchpointCommandDelete : public CommandObjectParsed {
           wp->ClearCallback();
       } else {
         result.AppendErrorWithFormat("Invalid watchpoint ID: %u.\n", cur_wp_id);
-        result.SetStatus(eReturnStatusFailed);
         return false;
       }
     }
@@ -586,14 +580,12 @@ class CommandObjectWatchpointCommandList : public CommandObjectParsed {
 
     if (num_watchpoints == 0) {
       result.AppendError("No watchpoints exist for which to list commands");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     if (command.GetArgumentCount() == 0) {
       result.AppendError(
           "No watchpoint specified for which to list the commands");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -601,7 +593,6 @@ class CommandObjectWatchpointCommandList : public CommandObjectParsed {
     if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(target, command,
                                                                valid_wp_ids)) {
       result.AppendError("Invalid watchpoints specification.");
-      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
@@ -633,7 +624,6 @@ class CommandObjectWatchpointCommandList : public CommandObjectParsed {
         } else {
           result.AppendErrorWithFormat("Invalid watchpoint ID: %u.\n",
                                        cur_wp_id);
-          result.SetStatus(eReturnStatusFailed);
         }
       }
     }


        


More information about the lldb-commits mailing list