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

Johnny Chen johnny.chen at apple.com
Fri Sep 10 09:19:10 PDT 2010


Author: johnny
Date: Fri Sep 10 11:19:10 2010
New Revision: 113589

URL: http://llvm.org/viewvc/llvm-project?rev=113589&view=rev
Log:
Don't flatten lldb and import everything into the global namespace.  Instead,
set the debugger_unique_id with the lldb prefix.

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=113589&r1=113588&r2=113589&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Fri Sep 10 11:19:10 2010
@@ -196,7 +196,7 @@
     if (success == 0)
     {
         // Import the Script Bridge module.
-        success =  PyRun_SimpleString ("from lldb import *");
+        success =  PyRun_SimpleString ("import lldb");
     }
 
     const char *pty_slave_name = GetScriptInterpreterPtyName ();
@@ -241,7 +241,7 @@
         PyRun_SimpleString ("tcsetattr (new_stdin, TCSANOW, new_mode)");
 
         run_string.Clear();
-        run_string.Printf ("debugger_unique_id = %d", interpreter.GetDebugger().GetID());
+        run_string.Printf ("lldb.debugger_unique_id = %d", interpreter.GetDebugger().GetID());
         PyRun_SimpleString (run_string.GetData());
     }
 





More information about the lldb-commits mailing list