2 Test that breakpoints correctly work in an thumb function in an arbitrary
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class TestBreakpointThumbCodesection(TestBase):
15 mydir = TestBase.compute_mydir(__file__)
17 @skipIf(archs=no_match(["arm"]))
18 @skipIfDarwinEmbedded # codegen on darwin always defaults to thumb for armv7/armv7k targets
19 def test_breakpoint(self):
21 exe = self.getBuildArtifact("a.out")
22 line = line_number('main.c', '// Set break point at this line.')
24 self.runCmd("target create %s" % exe)
25 bpid = lldbutil.run_break_set_by_file_and_line(self, "main.c", line)
29 self.assertIsNotNone(lldbutil.get_one_thread_stopped_at_breakpoint_id(
30 self.process(), bpid), "Process is not stopped at breakpoint")
32 self.process().Continue()
33 self.assertEqual(self.process().GetState(), lldb.eStateExited, PROCESS_EXITED)