[Lldb-commits] [lldb] r241338 - Make TestDisassembleBreakpoint arm and aarch64 compatible

Tamas Berghammer tberghammer at google.com
Fri Jul 3 03:32:55 PDT 2015


Author: tberghammer
Date: Fri Jul  3 05:32:55 2015
New Revision: 241338

URL: http://llvm.org/viewvc/llvm-project?rev=241338&view=rev
Log:
Make TestDisassembleBreakpoint arm and aarch64 compatible

Modified:
    lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py

Modified: lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=241338&r1=241337&r2=241338&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py (original)
+++ lldb/trunk/test/functionalities/disassembly/TestDisassembleBreakpoint.py Fri Jul  3 05:32:55 2015
@@ -39,18 +39,22 @@ class DisassemblyTestCase(TestBase):
 
         # ARCH, if not specified, defaults to x86_64.
         if self.getArchitecture() in ["", 'x86_64', 'i386']:
-            # make sure that the software breakpoint has been removed
-            self.assertFalse("int3" in disassembly)
-            # make sure a few reasonable assembly instructions are here
-            self.expect(disassembly, exe=False,
-                        startstr = "a.out`sum(int, int)",
-                        substrs = [' mov',
-                                   ' addl ',
-                                   'ret'])
+            breakpoint_opcodes = ["int3"]
+            instructions = [' mov', ' addl ', 'ret']
+        elif self.getArchitecture() in ["arm", "aarch64"]:
+            breakpoint_opcodes = ["brk", "udf"]
+            instructions = [' add ', ' ldr ', ' str ']
         else:
             # TODO please add your arch here
             self.fail('unimplemented for arch = "{arch}"'.format(arch=self.getArchitecture()))
 
+        # make sure that the software breakpoint has been removed
+        for op in breakpoint_opcodes:
+            self.assertFalse(op in disassembly)
+
+        # make sure a few reasonable assembly instructions are here
+        self.expect(disassembly, exe=False, startstr = "a.out`sum(int, int)", substrs = instructions)
+
 if __name__ == '__main__':
     import atexit
     lldb.SBDebugger.Initialize()





More information about the lldb-commits mailing list