2 Test some lldb command abbreviations.
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class DisassemblyTestCase(TestBase):
15 mydir = TestBase.compute_mydir(__file__)
16 NO_DEBUG_INFO_TESTCASE = True
20 target, _, _, bkpt = lldbutil.run_to_source_breakpoint(self,
21 "Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
23 disassembly_with_break = self.res.GetOutput().splitlines()
25 self.assertTrue(target.BreakpointDelete(bkpt.GetID()))
28 disassembly_without_break = self.res.GetOutput().splitlines()
30 # Make sure all assembly instructions are the same as instructions
31 # with the breakpoint removed.
32 self.assertEqual(len(disassembly_with_break),
33 len(disassembly_without_break))
34 for dis_inst_with, dis_inst_without in \
35 zip(disassembly_with_break, disassembly_without_break):
36 inst_with = dis_inst_with.split(':')[-1]
37 inst_without = dis_inst_without.split(':')[-1]
38 self.assertEqual(inst_with, inst_without)