diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Commands/CommandObjectGUI.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Core/IOHandler.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectGUI.cpp b/lldb/source/Commands/CommandObjectGUI.cpp index 09cb685a42f..fac2e962778 100644 --- a/lldb/source/Commands/CommandObjectGUI.cpp +++ b/lldb/source/Commands/CommandObjectGUI.cpp @@ -29,7 +29,9 @@ bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) { Debugger &debugger = GetDebugger(); File &input = debugger.GetInputFile(); - if (input.GetIsRealTerminal() && input.GetIsInteractive()) { + 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.PushIOHandler(io_handler_sp); diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp index 6f4b1df6ad4..350a5383507 100644 --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -266,7 +266,8 @@ IOHandlerEditline::IOHandlerEditline( #ifndef LLDB_DISABLE_LIBEDIT bool use_editline = false; - use_editline = m_input_sp && m_input_sp->GetIsRealTerminal(); + use_editline = GetInputFILE() && GetOutputFILE() && GetErrorFILE() && + m_input_sp && m_input_sp->GetIsRealTerminal(); if (use_editline) { m_editline_up.reset(new Editline(editline_name, GetInputFILE(), |