]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl, aarch64: extend dwfl_thread_state_registers to handle PAC
authorSteve Capper <steve.capper@arm.com>
Mon, 26 Aug 2024 10:52:56 +0000 (11:52 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 30 Aug 2024 13:10:39 +0000 (15:10 +0200)
commit64e3b451ad2cec8d45661b1816e3d2dc4431f3ca
treef87a2278bfaf5d5e25600e22731cc08d02118f29
parent0af6c7289c221c48795aa0a2eeb7e1592e176e0c
libdwfl, aarch64: extend dwfl_thread_state_registers to handle PAC

On AArch64 systems with pointer authentication enabled, one needs to
know the PAC mask in order to unwind functions that employ PAC.

This patch extends dwfl_thread_state_registers to handle the PAC mask
information by introducing a special register -2. (-1 is used in a
similar manner already for handling the program counter).

The AArch64 linux process attach logic is also extended to query ptrace
for the PAC mask.

A subsequent patch will add support for retrieving the PAC mask from an
AArch64 linux core file.

Signed-off-by: Steve Capper <steve.capper@arm.com>
backends/aarch64_initreg.c
libdwfl/dwfl_frame_regs.c
libdwfl/linux-pid-attach.c