mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-28 07:49:01 -04:00

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. llvm-svn: 116485
32 lines
770 B
Python
32 lines
770 B
Python
#
|
|
# append-debugger-id.py
|
|
#
|
|
# This script adds a global variable, 'debugger_unique_id' to the lldb
|
|
# 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
|
|
|
|
if len (sys.argv) != 2:
|
|
output_name = "./lldb.py"
|
|
else:
|
|
output_name = sys.argv[1] + "/lldb.py"
|
|
|
|
# print "output_name is '" + output_name + "'"
|
|
|
|
try:
|
|
f_out = open (output_name, 'a')
|
|
except IOError:
|
|
print "Error: Unable to open file for appending: " + output_name
|
|
else:
|
|
f_out.write ("debugger_unique_id = 0\n");
|
|
f_out.write ("SBDebugger.Initialize()\n");
|
|
try:
|
|
f_out.close()
|
|
except IOError:
|
|
print "Error occurred while close file."
|