[Lldb-commits] [lldb] [lldb] Support PtrAuth in the expression evaluator (PR #186001)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 12 10:06:26 PDT 2026
================
@@ -0,0 +1,29 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestPtrAuthFixups(TestBase):
+ @skipUnlessDarwin
+ @skipUnlessArch("arm64")
+ def test_static_function_pointer(self):
+ """Test that a static function pointer initialized in an expression
+ gets correctly signed on arm64e via the pointer signing fixup pass."""
+ self.build()
+
+ lldbutil.run_to_source_breakpoint(
+ self, "// break here", lldb.SBFileSpec("main.c", False)
+ )
+
+ self.expect_expr(
+ "static int (*fp)(int, int) = &add; fp(5, 6);",
----------------
JDevlieghere wrote:
They should be signed the same way, I just did both because "A broken clock is right twice a day" more than for a technical reason. I do hope to extend this test further in the future, although not by much as I explained in my reply to Oliver (I'm more interested in arm64e runs of the whole test suite).
https://github.com/llvm/llvm-project/pull/186001
More information about the lldb-commits
mailing list