[Lldb-commits] [lldb] [lldb][OpenBSD] Read AArch64 PAC mask from OpenBSD core files (PR #235795)
Brad Smith via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 26 08:06:13 PDT 2026
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/235795
OpenBSD/arm64 core files record the pointer authentication masks in
an NT_PACMASK (24) note. Add the note type to the OPENBSD namespace
and an AARCH64_PAC_Desc entry for it so the elf-core plugin picks up
the PAC masks and can strip PAC bits when unwinding OpenBSD cores.
>From 7ee7046e1c7597c8f509a195e0f19276e8cc0e75 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Mon, 26 Oct 2026 11:05:00 -0400
Subject: [PATCH] [lldb][OpenBSD] Read AArch64 PAC mask from OpenBSD core files
OpenBSD/arm64 core files record the pointer authentication masks in
an NT_PACMASK (24) note. Add the note type to the OPENBSD namespace
and an AARCH64_PAC_Desc entry for it so the elf-core plugin picks up
the PAC masks and can strip PAC bits when unwinding OpenBSD cores.
---
lldb/source/Plugins/Process/elf-core/RegisterUtilities.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h b/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h
index 66e257a6163f3c..9be405d2d3aaa5 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h
+++ b/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h
@@ -67,6 +67,7 @@ enum {
NT_AUXV = 11,
NT_REGS = 20,
NT_FPREGS = 21,
+ NT_PACMASK = 24,
};
}
@@ -246,6 +247,7 @@ constexpr RegsetDesc AARCH64_ZT_Desc[] = {
constexpr RegsetDesc AARCH64_PAC_Desc[] = {
{llvm::Triple::Linux, llvm::Triple::aarch64, llvm::ELF::NT_ARM_PAC_MASK},
+ {llvm::Triple::OpenBSD, llvm::Triple::aarch64, OPENBSD::NT_PACMASK},
};
constexpr RegsetDesc AARCH64_TLS_Desc[] = {
More information about the lldb-commits
mailing list