From 5320624dfd71cfcf0dafffed6cb6c7921fc745bf Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Sat, 8 Dec 2012 02:02:04 +0000 Subject: [PATCH] =?utf8?q?Even=20when=20we=20aren=E2=80=99t=20going=20to?= =?utf8?q?=20init=20all=20the=20lldb.frame,=20etc,=20globals,=20init=20lld?= =?utf8?q?b.debugger,=20since=20each=20script=20interpreter=20is=20tied=20?= =?utf8?q?to=20just=20one=20debugger.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit llvm-svn: 169663 --- lldb/source/Interpreter/ScriptInterpreterPython.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index b038e33..a94f870 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -624,6 +624,13 @@ ScriptInterpreterPython::EnterSession (bool init_lldb_globals) run_string.PutCString ("; lldb.frame = lldb.thread.GetSelectedFrame ()"); run_string.PutCString ("')"); } + else + { + // If we aren't initing the globals, we should still always set the debugger (since that is always unique.) + run_string.Printf ( "run_one_line (%s, \"lldb.debugger_unique_id = %" PRIu64, m_dictionary_name.c_str(), GetCommandInterpreter().GetDebugger().GetID()); + run_string.Printf ( "; lldb.debugger = lldb.SBDebugger.FindDebuggerWithID (%" PRIu64 ")", GetCommandInterpreter().GetDebugger().GetID()); + run_string.PutCString ("\")"); + } PyRun_SimpleString (run_string.GetData()); run_string.Clear(); -- 2.7.4