[Lldb-commits] [lldb] [lldb] Strip code pointers in lldb-server test binary on arm64e (PR #203988)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 15 13:58:26 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Alex Langford (bulbazord)
<details>
<summary>Changes</summary>
Otherwise an unstripped pointer will be sent to debugserver. LLDB strips pointers before sending them to debugserver, so debugserver does not know how to handle it.
This fixes TestGdbRemoteSingleStep.py, TestGdbRemote_qMemoryRegion.py, and TestGdbRemote_vCont.py on arm64e.
---
Full diff: https://github.com/llvm/llvm-project/pull/203988.diff
1 Files Affected:
- (modified) lldb/test/API/tools/lldb-server/main.cpp (+3)
``````````diff
diff --git a/lldb/test/API/tools/lldb-server/main.cpp b/lldb/test/API/tools/lldb-server/main.cpp
index 7e84552b0f25d..bbe523fc3c2f7 100644
--- a/lldb/test/API/tools/lldb-server/main.cpp
+++ b/lldb/test/API/tools/lldb-server/main.cpp
@@ -330,6 +330,9 @@ int main(int argc, char **argv) {
func_p = swap_chars;
std::lock_guard<std::mutex> lock(g_print_mutex);
+#if defined(__arm64e__)
+ func_p = __builtin_ptrauth_strip(func_p, /*ptrauth_key_asib*/ 1);
+#endif
printf("code address: %p\n", func_p);
} else if (consume_front(arg, "call-function:")) {
void (*func_p)() = nullptr;
``````````
</details>
https://github.com/llvm/llvm-project/pull/203988
More information about the lldb-commits
mailing list