[Lldb-commits] [lldb] r129885 - /lldb/trunk/test/class_types/TestClassTypesDisassembly.py
Johnny Chen
johnny.chen at apple.com
Wed Apr 20 15:30:17 PDT 2011
Author: johnny
Date: Wed Apr 20 17:30:17 2011
New Revision: 129885
URL: http://llvm.org/viewvc/llvm-project?rev=129885&view=rev
Log:
Use self.TraceOn() 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=129885&r1=129884&r2=129885&view=diff
==============================================================================
--- lldb/trunk/test/class_types/TestClassTypesDisassembly.py (original)
+++ lldb/trunk/test/class_types/TestClassTypesDisassembly.py Wed Apr 20 17:30:17 2011
@@ -103,8 +103,12 @@
# 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
+ for inst in lldb_iter(insts, 'GetSize', 'GetInstructionAtIndex'):
+ # It could simply be 'print inst' to print out the disassembly.
+ # But we want to print to stdout only if self.TraceOn() is True.
+ disasm = str(inst)
+ if self.TraceOn():
+ print disasm
if __name__ == '__main__':
More information about the lldb-commits
mailing list