[Lldb-commits] [lldb] r169663 - /lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp

Jim Ingham jingham at apple.com
Fri Dec 7 18:02:04 PST 2012


Author: jingham
Date: Fri Dec  7 20:02:04 2012
New Revision: 169663

URL: http://llvm.org/viewvc/llvm-project?rev=169663&view=rev
Log:
Even when we aren’t going to init all the lldb.frame, etc, globals, init lldb.debugger, since each script interpreter is tied to just one debugger.

Modified:
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=169663&r1=169662&r2=169663&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Fri Dec  7 20:02:04 2012
@@ -624,6 +624,13 @@
         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();





More information about the lldb-commits mailing list