aboutsummaryrefslogtreecommitdiff
path: root/gdb/features
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
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')
-rw-r--r--gdb/features/Makefile3
-rw-r--r--gdb/features/i386/64bit-pkeys.c14
-rw-r--r--gdb/features/i386/64bit-pkeys.xml13
-rw-r--r--gdb/features/i386/pkeys.c (renamed from gdb/features/i386/32bit-pkeys.c)4
-rw-r--r--gdb/features/i386/pkeys.xml (renamed from gdb/features/i386/32bit-pkeys.xml)0
5 files changed, 3 insertions, 31 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index 68e17d0..a2bb2a5 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -216,7 +216,6 @@ FEATURE_XMLFILES = aarch64-core.xml \
i386/32bit-avx.xml \
i386/32bit-mpx.xml \
i386/32bit-avx512.xml \
- i386/32bit-pkeys.xml \
i386/32bit-segments.xml \
i386/64bit-avx512.xml \
i386/64bit-core.xml \
@@ -224,8 +223,8 @@ FEATURE_XMLFILES = aarch64-core.xml \
i386/64bit-segments.xml \
i386/64bit-avx.xml \
i386/64bit-linux.xml \
- i386/64bit-pkeys.xml \
i386/64bit-sse.xml \
+ i386/pkeys.xml \
i386/x32-core.xml \
loongarch/base32.xml \
loongarch/base64.xml \
diff --git a/gdb/features/i386/64bit-pkeys.c b/gdb/features/i386/64bit-pkeys.c
deleted file mode 100644
index 83001d4..0000000
--- a/gdb/features/i386/64bit-pkeys.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
- Original: 64bit-pkeys.xml */
-
-#include "gdbsupport/tdesc.h"
-
-static int
-create_feature_i386_64bit_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;
-}
diff --git a/gdb/features/i386/64bit-pkeys.xml b/gdb/features/i386/64bit-pkeys.xml
deleted file mode 100644
index db6c10a..0000000
--- a/gdb/features/i386/64bit-pkeys.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright (C) 2016-2022 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.i386.pkeys">
-
- <reg name="pkru" bitsize="32" type="uint32"/>
-
-</feature>
diff --git a/gdb/features/i386/32bit-pkeys.c b/gdb/features/i386/pkeys.c
index 5e9087e..955d563 100644
--- a/gdb/features/i386/32bit-pkeys.c
+++ b/gdb/features/i386/pkeys.c
@@ -1,10 +1,10 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
- Original: 32bit-pkeys.xml */
+ Original: pkeys.xml */
#include "gdbsupport/tdesc.h"
static int
-create_feature_i386_32bit_pkeys (struct target_desc *result, long regnum)
+create_feature_i386_pkeys (struct target_desc *result, long regnum)
{
struct tdesc_feature *feature;
diff --git a/gdb/features/i386/32bit-pkeys.xml b/gdb/features/i386/pkeys.xml
index db6c10a..db6c10a 100644
--- a/gdb/features/i386/32bit-pkeys.xml
+++ b/gdb/features/i386/pkeys.xml