brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1011 B · c3b7d16 Raw
28 lines · python
1"""Test that AArch64 PAC bits are stripped from address expression arguments"""2 3import lldb4from lldbsuite.test.decorators import *5from lldbsuite.test.lldbtest import *6from lldbsuite.test import lldbutil7 8 9class TestPtrauthAddressExpressions(TestBase):10    NO_DEBUG_INFO_TESTCASE = True11 12    # On Darwin systems, arch arm64e means ARMv8.3 with ptrauth13    # ABI used.14    @skipIf(archs=no_match(["arm64e"]))15    def test(self):16        # Skip this test if not running on AArch64 target that supports PAC17        if not self.isAArch64PAuth():18            self.skipTest("Target must support pointer authentication.")19        self.source = "main.c"20        self.build()21        (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(22            self, "break here", lldb.SBFileSpec(self.source, False)23        )24 25        self.expect("p fptr", substrs=[self.source])26        self.expect("ima loo -va fptr", substrs=[self.source])27        self.expect("break set -a fptr", substrs=[self.source])28