diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-03-22 10:43:17 +0000 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-03-22 10:43:17 +0000 |
commit | 59c283728fddad638ae301cfb724d629fffc8665 (patch) | |
tree | dedb5d26df34ee67d16984a8ddf0b5e53d2e6290 /gdb/aarch64-linux-tdep.c | |
parent | 17e116a7d1501a46cf4e45ec181148dc6a1e3e2b (diff) | |
download | fsf-binutils-gdb-59c283728fddad638ae301cfb724d629fffc8665.zip fsf-binutils-gdb-59c283728fddad638ae301cfb724d629fffc8665.tar.gz fsf-binutils-gdb-59c283728fddad638ae301cfb724d629fffc8665.tar.bz2 |
AArch64: Read pauth section from core files
gdb/ChangeLog:
* aarch64-linux-tdep.c
(aarch64_linux_iterate_over_regset_sections): Check for pauth
section.
* aarch64-linux-tdep.h (AARCH64_LINUX_SIZEOF_PAUTH): New define.
Diffstat (limited to 'gdb/aarch64-linux-tdep.c')
-rw-r--r-- | gdb/aarch64-linux-tdep.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index d7db23e..bcd1961 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -627,6 +627,26 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, else cb (".reg2", AARCH64_LINUX_SIZEOF_FPREGSET, AARCH64_LINUX_SIZEOF_FPREGSET, &aarch64_linux_fpregset, NULL, cb_data); + + + if (tdep->has_pauth ()) + { + /* Create this on the fly in order to handle the variable location. */ + const struct regcache_map_entry pauth_regmap[] = + { + { 2, AARCH64_PAUTH_DMASK_REGNUM (tdep->pauth_reg_base), 8}, + { 0 } + }; + + const struct regset aarch64_linux_pauth_regset = + { + pauth_regmap, regcache_supply_regset, regcache_collect_regset + }; + + cb (".reg-aarch-pauth", AARCH64_LINUX_SIZEOF_PAUTH, + AARCH64_LINUX_SIZEOF_PAUTH, &aarch64_linux_pauth_regset, + "pauth registers", cb_data); + } } /* Implement the "core_read_description" gdbarch method. */ |