From 0653f01479ecbcbf3c4dfa6083187a5b2c2258c2 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 24 Feb 2022 07:34:01 -0800 Subject: 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. --- gdb/amd64-linux-tdep.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/amd64-linux-tdep.c') 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 { -- cgit v1.1