[Lldb-commits] [lldb] r116485 - in /lldb/trunk: scripts/Python/append-debugger-id.py test/dotest.py

Johnny Chen johnny.chen at apple.com
Thu Oct 14 09:36:49 PDT 2010


Author: johnny
Date: Thu Oct 14 11:36:49 2010
New Revision: 116485

URL: http://llvm.org/viewvc/llvm-project?rev=116485&view=rev
Log:
Change the call within lldb.py to 'SBDebugger.Initialize()' from 'lldb.SBDebugger.Initialize()'.
Inside the lldb module, there's no need (and as a matter of fact, incorrect) to specify the 'lldb'
module name.

Comment out the call to lldb.SBDebugger.Initialize() within the test driver itself, since it is
already done when we import the lldb.py module.

Modified:
    lldb/trunk/scripts/Python/append-debugger-id.py
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/scripts/Python/append-debugger-id.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/append-debugger-id.py?rev=116485&r1=116484&r2=116485&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/append-debugger-id.py (original)
+++ lldb/trunk/scripts/Python/append-debugger-id.py Thu Oct 14 11:36:49 2010
@@ -5,6 +5,9 @@
 # module (which was automatically generated via running swig), and 
 # initializes it to 0.
 #
+# It also calls SBDebugger.Initialize() to initialize the lldb debugger
+# subsystem.
+#
 
 import sys
 
@@ -21,7 +24,7 @@
     print "Error:  Unable to open file for appending: " + output_name
 else:
     f_out.write ("debugger_unique_id = 0\n");
-    f_out.write ("lldb.SBDebugger.Initialize()\n");
+    f_out.write ("SBDebugger.Initialize()\n");
     try:
         f_out.close()
     except IOError:

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=116485&r1=116484&r2=116485&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Thu Oct 14 11:36:49 2010
@@ -488,7 +488,9 @@
 # For the time being, let's bracket the test runner within the
 # lldb.SBDebugger.Initialize()/Terminate() pair.
 import lldb, atexit
-lldb.SBDebugger.Initialize()
+# Update: the act of importing lldb now executes lldb.SBDebugger.Initialize(),
+# there's no need to call it a second time.
+#lldb.SBDebugger.Initialize()
 atexit.register(lambda: lldb.SBDebugger.Terminate())
 
 # Create a singleton SBDebugger in the lldb namespace.





More information about the lldb-commits mailing list