AArch64: Read pauth registers
authorAlan Hayward <alan.hayward@arm.com>
Fri, 22 Mar 2019 10:31:02 +0000 (10:31 +0000)
committerAlan Hayward <alan.hayward@arm.com>
Fri, 22 Mar 2019 10:31:02 +0000 (10:31 +0000)
commit76bed0fd9493868889929ca9dcd32350c1d864be
treee799ee78fc4b6802da976a837deea5a6f44c63a2
parentee4fbcfa26eb4a2a3666f7c1cc31447c3cffa023
AArch64: Read pauth registers

Initialise the pauth registers when creating a target description, and store
the regnum of the first pauth register.

Use ptrace to read the registers in the pauth feature.

Do not allow the registers to be written.

gdb/ChangeLog:

* aarch64-linux-nat.c (fetch_pauth_masks_from_thread): New
function.
(aarch64_linux_nat_target::fetch_registers): Read pauth registers.
* aarch64-tdep.c (aarch64_cannot_store_register): New function.
(aarch64_gdbarch_init): Add puth registers.
* aarch64-tdep.h (struct gdbarch_tdep): Add pauth features.
* arch/aarch64.h (AARCH64_PAUTH_DMASK_REGNUM): New define.
(AARCH64_PAUTH_CMASK_REGNUM): Likewise.
gdb/ChangeLog
gdb/aarch64-linux-nat.c
gdb/aarch64-tdep.c
gdb/aarch64-tdep.h
gdb/arch/aarch64.h