[Lldb-commits] [lldb] r123029 - /lldb/trunk/test/class_types/TestClassTypesDisassembly.py
Johnny Chen
johnny.chen at apple.com
Fri Jan 7 12:34:32 PST 2011
Author: johnny
Date: Fri Jan 7 14:34:32 2011
New Revision: 123029
URL: http://llvm.org/viewvc/llvm-project?rev=123029&view=rev
Log:
Modify disassemble_call_stack_python() to not rely on the "disassemble -n function_name"
command to do the disassembly. Instead, use the Python API.
Modified:
lldb/trunk/test/class_types/TestClassTypesDisassembly.py
Modified: lldb/trunk/test/class_types/TestClassTypesDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_types/TestClassTypesDisassembly.py?rev=123029&r1=123028&r2=123029&view=diff
==============================================================================
--- lldb/trunk/test/class_types/TestClassTypesDisassembly.py (original)
+++ lldb/trunk/test/class_types/TestClassTypesDisassembly.py Fri Jan 7 14:34:32 2011
@@ -96,7 +96,15 @@
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__':
More information about the lldb-commits
mailing list