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