From 145449b1e420787bb99721a429341fa6be3adfb6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 3 Jul 2022 16:10:23 +0200 Subject: Vendor import of llvm-project main llvmorg-15-init-15358-g53dc0f107877. --- lldb/source/Commands/CommandObjectGUI.cpp | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'lldb/source/Commands/CommandObjectGUI.cpp') diff --git a/lldb/source/Commands/CommandObjectGUI.cpp b/lldb/source/Commands/CommandObjectGUI.cpp index 86c47a2f0634..a63d1718610c 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 -- cgit v1.3