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/aarch64-tdep.h | |
parent | ee4fbcfa26eb4a2a3666f7c1cc31447c3cffa023 (diff) | |
download | binutils-gdb-76bed0fd9493868889929ca9dcd32350c1d864be.tar.gz |
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/aarch64-tdep.h')
-rw-r--r-- | gdb/aarch64-tdep.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h index 3db6bee9f3f..f9fc8965f02 100644 --- a/gdb/aarch64-tdep.h +++ b/gdb/aarch64-tdep.h @@ -87,6 +87,14 @@ struct gdbarch_tdep { return vq != 0; } + + int pauth_reg_base; + + /* Returns true if the target supports pauth. */ + bool has_pauth () const + { + return pauth_reg_base != -1; + } }; const target_desc *aarch64_read_description (uint64_t vq, bool pauth_p); |