diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-03-22 10:31:02 +0000 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-03-22 10:31:02 +0000 |
commit | 76bed0fd9493868889929ca9dcd32350c1d864be (patch) | |
tree | e799ee78fc4b6802da976a837deea5a6f44c63a2 /gdb/arch | |
parent | ee4fbcfa26eb4a2a3666f7c1cc31447c3cffa023 (diff) | |
download | fsf-binutils-gdb-76bed0fd9493868889929ca9dcd32350c1d864be.zip fsf-binutils-gdb-76bed0fd9493868889929ca9dcd32350c1d864be.tar.gz fsf-binutils-gdb-76bed0fd9493868889929ca9dcd32350c1d864be.tar.bz2 |
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.
Diffstat (limited to 'gdb/arch')
-rw-r--r-- | gdb/arch/aarch64.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h index 4fe6d02..8c80b7b 100644 --- a/gdb/arch/aarch64.h +++ b/gdb/arch/aarch64.h @@ -66,6 +66,9 @@ enum aarch64_regnum #define AARCH64_B0_REGNUM (AARCH64_H0_REGNUM + 32) #define AARCH64_SVE_V0_REGNUM (AARCH64_B0_REGNUM + 32) +#define AARCH64_PAUTH_DMASK_REGNUM(pauth_reg_base) (pauth_reg_base) +#define AARCH64_PAUTH_CMASK_REGNUM(pauth_reg_base) (pauth_reg_base + 1) + #define AARCH64_X_REGS_NUM 31 #define AARCH64_V_REGS_NUM 32 #define AARCH64_SVE_Z_REGS_NUM AARCH64_V_REGS_NUM |