From fbc0d27144fccf51fb4a4548491b41ceaf23cbce Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 28 Apr 2011 21:31:18 +0000 Subject: Move the iteration protocol of lldb objects to the auto-generated lldb Python module. This is so that the objects which support the iteration protocol are immediately obvious from looking at the lldb.py file. SBTarget supports two types of iterations: module and breakpoint. For an SBTarget instance, you will need to issue either: for m in target.module_iter() or for b in target.breakpoint_iter() For other single iteration protocol objects, just use, for example: for thread in process: ID = thread.GetThreadID() for frame in thread: frame.Disassemble() .... llvm-svn: 130442 --- lldb/scripts/Python/append-debugger-id.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 lldb/scripts/Python/append-debugger-id.py (limited to 'lldb/scripts/Python/append-debugger-id.py') diff --git a/lldb/scripts/Python/append-debugger-id.py b/lldb/scripts/Python/append-debugger-id.py deleted file mode 100644 index e1e3628157e..00000000000 --- a/lldb/scripts/Python/append-debugger-id.py +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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 + "'" - -with open(output_name, 'a') as f_out: - f_out.write("debugger_unique_id = 0\n") - f_out.write("SBDebugger.Initialize()\n") -- cgit v1.2.3