More termios fixes. We need to currently make sure to include:
#include "lldb/Host/Config.h"
Or the LLDB_CONFIG_TERMIOS_SUPPORTED defined won't be set. I will fix all
of this Termios stuff later today by moving lldb/Core/TTYState.* into the
host layer and then we conditionalize all of this inside TTYState.cpp and
then we get rid of LLDB_CONFIG_TERMIOS_SUPPORTED all together.
Typically, when we start to see too many "#if LLDB_CONFIG_XXXX" preprocessor
directives, this is a good indicator that something needs to be moved over to
the host layer. TTYState can be modified to do all of the things that many
areas of the code are currently doing, and it will avoid all of the
preprocessor noise.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125027 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/ScriptInterpreterPython.cpp b/source/Interpreter/ScriptInterpreterPython.cpp
index 9122b7e..d461fb2 100644
--- a/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/source/Interpreter/ScriptInterpreterPython.cpp
@@ -203,8 +203,8 @@
m_dictionary_name (interpreter.GetDebugger().GetInstanceName().AsCString()),
#if LLDB_CONFIG_TERMIOS_SUPPORTED
m_termios (),
-#endif // #if LLDB_CONFIG_TERMIOS_SUPPORTED
m_termios_valid (false),
+#endif // #if LLDB_CONFIG_TERMIOS_SUPPORTED
m_session_is_active (false),
m_pty_slave_is_open (false),
m_valid_session (true)
@@ -1434,12 +1434,10 @@
void
ScriptInterpreterPython::Initialize ()
{
-
Timer scoped_timer (__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
- int input_fd = STDIN_FILENO;
-
#if LLDB_CONFIG_TERMIOS_SUPPORTED
+ int input_fd = STDIN_FILENO;
struct termios stdin_termios;
bool valid_termios = ::tcgetattr (input_fd, &stdin_termios) == 0;
#endif // #if LLDB_CONFIG_TERMIOS_SUPPORTED