aboutsummaryrefslogtreecommitdiff
path: root/gdb/features/i386/pkeys.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2022-02-24 07:34:01 -0800
committerH.J. Lu <hjl.tools@gmail.com>2022-03-31 10:25:26 -0700
commit0653f01479ecbcbf3c4dfa6083187a5b2c2258c2 (patch)
tree90de7e80ea6171ae223d6d81f4810c47dfffe0d5 /gdb/features/i386/pkeys.c
parent5a0c4a06eb4f4afcf885596ee97706c1045a8476 (diff)
downloadgdb-0653f01479ecbcbf3c4dfa6083187a5b2c2258c2.zip
gdb-0653f01479ecbcbf3c4dfa6083187a5b2c2258c2.tar.gz
gdb-0653f01479ecbcbf3c4dfa6083187a5b2c2258c2.tar.bz2
gdb: Consolidate 32bit-pkeys.xml and 64bit-pkeys.xml
1. Since 32bit-pkeys.xml and 64bit-pkeys.xml are identical, consolidate them into a single keys.xml. 2. Enable PKU for x32 to fix: $ gdbserver :123456 x32-program ... .../gdbserver/regcache.cc:255: A problem internal to GDBserver has been detected . Unknown register pkru requested on Tiger Lake.
Diffstat (limited to 'gdb/features/i386/pkeys.c')
-rw-r--r--gdb/features/i386/pkeys.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/features/i386/pkeys.c b/gdb/features/i386/pkeys.c
new file mode 100644
index 0000000..955d563
--- /dev/null
+++ b/gdb/features/i386/pkeys.c
@@ -0,0 +1,14 @@
+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
+ Original: pkeys.xml */
+
+#include "gdbsupport/tdesc.h"
+
+static int
+create_feature_i386_pkeys (struct target_desc *result, long regnum)
+{
+ struct tdesc_feature *feature;
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.pkeys");
+ tdesc_create_reg (feature, "pkru", regnum++, 1, NULL, 32, "uint32");
+ return regnum;
+}