From 645bf5420d9afc9dbcc9a59f45c48b3b15ca8a14 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 27 Jan 2011 01:01:10 +0000 Subject: Added support for some new environment variables within LLDB to enable some extra launch options: LLDB_LAUNCH_FLAG_DISABLE_ASLR disables ASLR for all launched processes LLDB_LAUNCH_FLAG_DISABLE_STDIO will disable STDIO (reroute to "/dev/null") for all launched processes LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY will force all launched processes to be launched in new terminal windows. Also, don't init python if we never create a script interpreter. llvm-svn: 124341 --- lldb/source/Interpreter/ScriptInterpreterPython.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp') diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 224ea7f6d373..368399b08e58 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -224,6 +224,14 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete m_valid_session (true) { + static int g_initialized = false; + + if (!g_initialized) + { + g_initialized = true; + ScriptInterpreterPython::Initialize (); + } + bool safe_to_run = false; bool need_to_release_lock = true; int interval = 5; // Number of seconds to try getting the Python lock before timing out. -- cgit v1.2.3