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