[Lldb-commits] [lldb] r148717 - /lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
Johnny Chen
johnny.chen at apple.com
Mon Jan 23 11:37:53 PST 2012
Author: johnny
Date: Mon Jan 23 13:37:53 2012
New Revision: 148717
URL: http://llvm.org/viewvc/llvm-project?rev=148717&view=rev
Log:
Dump the raw bytes and the disassembled instruction before calling self.assertTrue() instead of after,
in case the assert fails for any reason.
Modified:
lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
Modified: lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py?rev=148717&r1=148716&r2=148717&view=diff
==============================================================================
--- lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py (original)
+++ lldb/trunk/test/python_api/disassemble-raw-data/TestDisassembleRawData.py Mon Jan 23 13:37:53 2012
@@ -30,14 +30,14 @@
inst = insts.GetInstructionAtIndex(0)
- self.assertTrue (inst.GetMnemonic(target) == "movq")
- self.assertTrue (inst.GetOperands(target) == '%' + "rsp, " + '%' + "rbp")
-
if self.TraceOn():
print
print "Raw bytes: ", [hex(x) for x in raw_bytes]
print "Disassembled:", inst
+ self.assertTrue (inst.GetMnemonic(target) == "movq")
+ self.assertTrue (inst.GetOperands(target) == '%' + "rsp, " + '%' + "rbp")
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
More information about the lldb-commits
mailing list