[Lldb-commits] [lldb] [lldb] Support PtrAuth in the expression evaluator (PR #186001)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 12 03:31:17 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);",
----------------
DavidSpickett wrote:
Is it because when you return from `add`, the return address must be signed? So I can call in, but getting back is a problem?
https://github.com/llvm/llvm-project/pull/186001
More information about the lldb-commits
mailing list