diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp b/contrib/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp index 67ddc68a169e..21ed510d1264 100644 --- a/contrib/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp +++ b/contrib/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp @@ -8,10 +8,9 @@ #include "CommandObjectGUI.h" -#include "lldb/Core/IOHandlerCursesGUI.h" -#include "lldb/Host/Config.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" +#include "lldb/lldb-private.h" using namespace lldb; using namespace lldb_private; @@ -25,14 +24,13 @@ CommandObjectGUI::CommandObjectGUI(CommandInterpreter &interpreter) CommandObjectGUI::~CommandObjectGUI() {} bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) { -#if LLDB_ENABLE_CURSES +#ifndef LLDB_DISABLE_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()) { + lldb::StreamFileSP input_sp = debugger.GetInputFile(); + if (input_sp && input_sp->GetFile().GetIsRealTerminal() && + input_sp->GetFile().GetIsInteractive()) { IOHandlerSP io_handler_sp(new IOHandlerCursesGUI(debugger)); if (io_handler_sp) debugger.PushIOHandler(io_handler_sp); |
