diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Commands/CommandObjectCommands.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 11fed6edf32..d2f4cea1ad8 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -859,6 +859,7 @@ protected: "defined regular expression command names", GetCommandName().str().c_str()); result.SetStatus(eReturnStatusFailed); + return false; } auto command_name = args[0].ref; @@ -1724,6 +1725,12 @@ public: ~CommandObjectCommandsScriptList() override = default; 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; + } + m_interpreter.GetHelp(result, CommandInterpreter::eCommandTypesUserDef); result.SetStatus(eReturnStatusSuccessFinishResult); @@ -1744,6 +1751,12 @@ public: protected: 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; + } + m_interpreter.RemoveAllUser(); result.SetStatus(eReturnStatusSuccessFinishResult); |