diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-01-07 20:34:32 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-01-07 20:34:32 +0000 |
| commit | 117ff9005c7f7b8bd26b50ad0250d06a0b0545be (patch) | |
| tree | b149cefbf8fba106bf6e558a5d4a80b79f02d651 | |
| parent | 9bf259581c8877014b96b488ef7de5885bea692c (diff) | |
| download | bcm5719-llvm-117ff9005c7f7b8bd26b50ad0250d06a0b0545be.tar.gz bcm5719-llvm-117ff9005c7f7b8bd26b50ad0250d06a0b0545be.zip | |
Modify disassemble_call_stack_python() to not rely on the "disassemble -n function_name"
command to do the disassembly. Instead, use the Python API.
llvm-svn: 123029
| -rw-r--r-- | lldb/test/class_types/TestClassTypesDisassembly.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/test/class_types/TestClassTypesDisassembly.py b/lldb/test/class_types/TestClassTypesDisassembly.py index ff3c88eb6f7..1791f16417e 100644 --- a/lldb/test/class_types/TestClassTypesDisassembly.py +++ b/lldb/test/class_types/TestClassTypesDisassembly.py @@ -96,7 +96,15 @@ class IterateFrameAndDisassembleTestCase(TestBase): for i in range(depth - 1): frame = thread.GetFrameAtIndex(i) function = frame.GetFunction() - self.runCmd("disassemble -n '%s'" % function.GetName()) + # Print the function header. + print + print function + if function.IsValid(): + # Get all instructions for this function and print them out. + insts = function.GetInstructions(target) + from lldbutil import lldb_iter + for i in lldb_iter(insts, 'GetSize', 'GetInstructionAtIndex'): + print i if __name__ == '__main__': |

