aboutsummaryrefslogtreecommitdiff
path: root/gdb/features
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-03-22 09:58:42 +0000
committerAlan Hayward <alan.hayward@arm.com>2019-03-22 09:58:42 +0000
commit6dc0ebde59dfb73eae507ced718bafa54023bf33 (patch)
tree9cc851b66b4b94d633e576f1b955edfe9b63d81c /gdb/features
parent968aa7ae389d9e6cecb5fda6826bf889ed959fce (diff)
downloadgdb-6dc0ebde59dfb73eae507ced718bafa54023bf33.zip
gdb-6dc0ebde59dfb73eae507ced718bafa54023bf33.tar.gz
gdb-6dc0ebde59dfb73eae507ced718bafa54023bf33.tar.bz2
AArch64: Add pointer authentication feature
Pointer Authentication is a new feature in AArch64 v8.3-a. When enabled in the compiler, function return addresses will be mangled by the kernel. Add register description xml and wire up to aarch64_linux_read_description. This description includes the two pauth user registers. Nothing yet uses the feature - that is added in later patches. gdb/ChangeLog: * aarch64-linux-nat.c (aarch64_linux_nat_target::read_description): Add pauth param. * aarch64-linux-tdep.c (aarch64_linux_core_read_description): Likewise. * aarch64-tdep.c (struct target_desc): Add in pauth. (aarch64_read_description): Add pauth param. (aarch64_gdbarch_init): Likewise. * aarch64-tdep.h (aarch64_read_description): Likewise. * arch/aarch64.c (aarch64_create_target_description): Likewise. * arch/aarch64.h (aarch64_create_target_description): Likewise. * features/Makefile: Add new files. * features/aarch64-pauth.c: New file. * features/aarch64-pauth.xml: New file. gdb/doc/ChangeLog: * gdb.texinfo: Describe pauth feature. gdb/gdbserver/ChangeLog: * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param. (initialize_low_tracepoint): Likewise. * linux-aarch64-low.c (aarch64_arch_setup): Likewise. * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise. * linux-aarch64-tdesc.c (struct target_desc): Likewise. (aarch64_linux_read_description): Likewise. * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
Diffstat (limited to 'gdb/features')
-rw-r--r--gdb/features/Makefile1
-rw-r--r--gdb/features/aarch64-pauth.c16
-rw-r--r--gdb/features/aarch64-pauth.xml13
3 files changed, 30 insertions, 0 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index 3d84ca0..d0cd4f8 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -227,6 +227,7 @@ $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl
FEATURE_XMLFILES = aarch64-core.xml \
aarch64-fpu.xml \
+ aarch64-pauth.xml \
i386/32bit-core.xml \
i386/32bit-sse.xml \
i386/32bit-linux.xml \
diff --git a/gdb/features/aarch64-pauth.c b/gdb/features/aarch64-pauth.c
new file mode 100644
index 0000000..e4b84ff
--- /dev/null
+++ b/gdb/features/aarch64-pauth.c
@@ -0,0 +1,16 @@
+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
+ Original: aarch64-pauth.xml */
+
+#include "common/tdesc.h"
+
+static int
+create_feature_aarch64_pauth (struct target_desc *result, long regnum)
+{
+ struct tdesc_feature *feature;
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.pauth");
+ tdesc_create_reg (feature, "pauth_dmask", regnum++, 1, NULL, 64, "int");
+ tdesc_create_reg (feature, "pauth_cmask", regnum++, 1, NULL, 64, "int");
+
+ return regnum;
+}
diff --git a/gdb/features/aarch64-pauth.xml b/gdb/features/aarch64-pauth.xml
new file mode 100644
index 0000000..9c8987f
--- /dev/null
+++ b/gdb/features/aarch64-pauth.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2018 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.aarch64.pauth">
+ <reg name="pauth_dmask" bitsize="64"/>
+ <reg name="pauth_cmask" bitsize="64"/>
+</feature>
+