brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · dc3f3ed Raw
47 lines · python
1"""2Test that breakpoints in an IT instruction don't fire if their condition is3false.4"""5 6 7import lldb8from lldbsuite.test.decorators import *9from lldbsuite.test.lldbtest import *10from lldbsuite.test import lldbutil11 12 13class TestBreakpointIt(TestBase):14    NO_DEBUG_INFO_TESTCASE = True15 16    @skipIf(archs=no_match(["arm$"]))17    @skipIf(archs=["arm64", "arm64e", "arm64_32"])18    def test_false(self):19        self.build()20        exe = self.getBuildArtifact("a.out")21 22        self.runCmd("target create %s" % exe)23        lldbutil.run_break_set_by_symbol(24            self, "bkpt_false", extra_options="--skip-prologue 0"25        )26 27        self.runCmd("run")28        self.assertState(29            self.process().GetState(), lldb.eStateExited, "Breakpoint does not get hit"30        )31 32    @skipIf(archs=no_match(["arm$"]))33    @skipIf(archs=["arm64", "arm64e", "arm64_32"])34    def test_true(self):35        self.build()36        exe = self.getBuildArtifact("a.out")37 38        self.runCmd("target create %s" % exe)39        bpid = lldbutil.run_break_set_by_symbol(40            self, "bkpt_true", extra_options="--skip-prologue 0"41        )42 43        self.runCmd("run")44        self.assertIsNotNone(45            lldbutil.get_one_thread_stopped_at_breakpoint_id(self.process(), bpid)46        )47