diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectGUI.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectGUI.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lldb/source/Commands/CommandObjectGUI.cpp b/lldb/source/Commands/CommandObjectGUI.cpp index 86c47a2..a63d171 100644 --- a/lldb/source/Commands/CommandObjectGUI.cpp +++ b/lldb/source/Commands/CommandObjectGUI.cpp @@ -26,22 +26,18 @@ CommandObjectGUI::~CommandObjectGUI() = default; bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) { #if LLDB_ENABLE_CURSES - if (args.GetArgumentCount() == 0) { - Debugger &debugger = GetDebugger(); - - File &input = debugger.GetInputFile(); - File &output = debugger.GetOutputFile(); - if (input.GetStream() && output.GetStream() && input.GetIsRealTerminal() && - input.GetIsInteractive()) { - IOHandlerSP io_handler_sp(new IOHandlerCursesGUI(debugger)); - if (io_handler_sp) - debugger.RunIOHandlerAsync(io_handler_sp); - result.SetStatus(eReturnStatusSuccessFinishResult); - } else { - result.AppendError("the gui command requires an interactive terminal."); - } + Debugger &debugger = GetDebugger(); + + File &input = debugger.GetInputFile(); + File &output = debugger.GetOutputFile(); + if (input.GetStream() && output.GetStream() && input.GetIsRealTerminal() && + input.GetIsInteractive()) { + IOHandlerSP io_handler_sp(new IOHandlerCursesGUI(debugger)); + if (io_handler_sp) + debugger.RunIOHandlerAsync(io_handler_sp); + result.SetStatus(eReturnStatusSuccessFinishResult); } else { - result.AppendError("the gui command takes no arguments."); + result.AppendError("the gui command requires an interactive terminal."); } return true; #else |