aboutsummaryrefslogtreecommitdiff
path: root/gdb/aarch64-linux-tdep.h
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-03-22 10:00:28 +0000
committerAlan Hayward <alan.hayward@arm.com>2019-03-22 10:10:22 +0000
commitee4fbcfa26eb4a2a3666f7c1cc31447c3cffa023 (patch)
tree16ce0420d78dc816de2e8c1017a6b16efa229846 /gdb/aarch64-linux-tdep.h
parent6dc0ebde59dfb73eae507ced718bafa54023bf33 (diff)
downloadfsf-binutils-gdb-ee4fbcfa26eb4a2a3666f7c1cc31447c3cffa023.zip
fsf-binutils-gdb-ee4fbcfa26eb4a2a3666f7c1cc31447c3cffa023.tar.gz
fsf-binutils-gdb-ee4fbcfa26eb4a2a3666f7c1cc31447c3cffa023.tar.bz2
AArch64: Use HWCAP to detect pauth feature
Add aarch64_get_hwcap functions for reading the HWCAP. From this extract the PACA value and use this to enable pauth. gdb/ChangeLog: * aarch64-linux-nat.c (aarch64_linux_nat_target::read_description): Read PACA hwcap. * aarch64-linux-tdep.c (aarch64_linux_core_read_description): Likewise. (aarch64_linux_get_hwcap): New function. * aarch64-linux-tdep.h (AARCH64_HWCAP_PACA): New define. (aarch64_linux_get_hwcap): New declaration. gdb/gdbserver/ChangeLog: * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define. (aarch64_get_hwcap): New function. (aarch64_arch_setup): Read APIA hwcap.
Diffstat (limited to 'gdb/aarch64-linux-tdep.h')
-rw-r--r--gdb/aarch64-linux-tdep.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/aarch64-linux-tdep.h b/gdb/aarch64-linux-tdep.h
index 814222e..e9f7c9b 100644
--- a/gdb/aarch64-linux-tdep.h
+++ b/gdb/aarch64-linux-tdep.h
@@ -36,4 +36,10 @@
extern const struct regset aarch64_linux_gregset;
extern const struct regset aarch64_linux_fpregset;
+/* Matches HWCAP_PACA in kernel header arch/arm64/include/uapi/asm/hwcap.h. */
+#define AARCH64_HWCAP_PACA (1 << 30)
+
+/* Fetch the AT_HWCAP entry from the auxv vector for the given TARGET. */
+bool aarch64_linux_get_hwcap (struct target_ops *target, CORE_ADDR *hwcap);
+
#endif /* AARCH64_LINUX_TDEP_H */