diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-04-28 21:31:18 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-04-28 21:31:18 +0000 |
commit | fbc0d27144fccf51fb4a4548491b41ceaf23cbce (patch) | |
tree | 1a3277cfe377c758382357c79dd179a4f40c633d /lldb/scripts/Python/build-swig-Python.sh | |
parent | c44d313cff9dcbbd7bfaba14095dc469807178d4 (diff) | |
download | bcm5719-llvm-fbc0d27144fccf51fb4a4548491b41ceaf23cbce.tar.gz bcm5719-llvm-fbc0d27144fccf51fb4a4548491b41ceaf23cbce.zip |
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
Diffstat (limited to 'lldb/scripts/Python/build-swig-Python.sh')
-rwxr-xr-x | lldb/scripts/Python/build-swig-Python.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/scripts/Python/build-swig-Python.sh b/lldb/scripts/Python/build-swig-Python.sh index f34e5fae00a..0c28872046f 100755 --- a/lldb/scripts/Python/build-swig-Python.sh +++ b/lldb/scripts/Python/build-swig-Python.sh @@ -173,12 +173,13 @@ fi $SWIG -c++ -shadow -python -I"/usr/include" -I"${SRC_ROOT}/include" -I./. -outdir "${CONFIG_BUILD_DIR}" -o "${swig_output_file}" "${swig_input_file}" +# Implement the iterator protocol for some lldb objects. # Append global variable to lldb Python module. - +# And initialize the lldb debugger subsystem. current_dir=`pwd` -if [ -f "${current_dir}/append-debugger-id.py" ] +if [ -f "${current_dir}/modify-python-lldb.py" ] then - python ${current_dir}/append-debugger-id.py ${CONFIG_BUILD_DIR} + python ${current_dir}/modify-python-lldb.py ${CONFIG_BUILD_DIR} fi # Fix the "#include" statement in the swig output file |