aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-linux-tdep.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/amd64-linux-tdep.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/amd64-linux-tdep.c')
-rw-r--r--gdb/amd64-linux-tdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index b61428d..88a24c1 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1578,14 +1578,16 @@ amd64_linux_read_description (uint64_t xcr0_features_bit, bool is_x32)
{
static target_desc *amd64_linux_tdescs \
[2/*AVX*/][2/*MPX*/][2/*AVX512*/][2/*PKRU*/] = {};
- static target_desc *x32_linux_tdescs[2/*AVX*/][2/*AVX512*/] = {};
+ static target_desc *x32_linux_tdescs \
+ [2/*AVX*/][2/*AVX512*/][2/*PKRU*/] = {};
target_desc **tdesc;
if (is_x32)
{
tdesc = &x32_linux_tdescs[(xcr0_features_bit & X86_XSTATE_AVX) ? 1 : 0 ]
- [(xcr0_features_bit & X86_XSTATE_AVX512) ? 1 : 0];
+ [(xcr0_features_bit & X86_XSTATE_AVX512) ? 1 : 0]
+ [(xcr0_features_bit & X86_XSTATE_PKRU) ? 1 : 0];
}
else
{