diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-02-24 07:34:01 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-03-31 10:25:26 -0700 |
commit | 0653f01479ecbcbf3c4dfa6083187a5b2c2258c2 (patch) | |
tree | 90de7e80ea6171ae223d6d81f4810c47dfffe0d5 /gdb/arch | |
parent | 5a0c4a06eb4f4afcf885596ee97706c1045a8476 (diff) | |
download | gdb-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/arch')
-rw-r--r-- | gdb/arch/amd64.c | 6 | ||||
-rw-r--r-- | gdb/arch/i386.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gdb/arch/amd64.c b/gdb/arch/amd64.c index 2071652..559f678 100644 --- a/gdb/arch/amd64.c +++ b/gdb/arch/amd64.c @@ -25,9 +25,9 @@ #include "../features/i386/64bit-core.c" #include "../features/i386/64bit-linux.c" #include "../features/i386/64bit-mpx.c" -#include "../features/i386/64bit-pkeys.c" #include "../features/i386/64bit-segments.c" #include "../features/i386/64bit-sse.c" +#include "../features/i386/pkeys.c" #include "../features/i386/x32-core.c" @@ -72,8 +72,8 @@ amd64_create_target_description (uint64_t xcr0, bool is_x32, bool is_linux, if (xcr0 & X86_XSTATE_AVX512) regnum = create_feature_i386_64bit_avx512 (tdesc.get (), regnum); - if ((xcr0 & X86_XSTATE_PKRU) && !is_x32) - regnum = create_feature_i386_64bit_pkeys (tdesc.get (), regnum); + if (xcr0 & X86_XSTATE_PKRU) + regnum = create_feature_i386_pkeys (tdesc.get (), regnum); return tdesc.release (); } diff --git a/gdb/arch/i386.c b/gdb/arch/i386.c index 6241053..f5b33a8 100644 --- a/gdb/arch/i386.c +++ b/gdb/arch/i386.c @@ -27,8 +27,8 @@ #include "../features/i386/32bit-avx.c" #include "../features/i386/32bit-avx512.c" #include "../features/i386/32bit-mpx.c" -#include "../features/i386/32bit-pkeys.c" #include "../features/i386/32bit-segments.c" +#include "../features/i386/pkeys.c" /* Create i386 target descriptions according to XCR0. */ @@ -67,7 +67,7 @@ i386_create_target_description (uint64_t xcr0, bool is_linux, bool segments) regnum = create_feature_i386_32bit_avx512 (tdesc.get (), regnum); if (xcr0 & X86_XSTATE_PKRU) - regnum = create_feature_i386_32bit_pkeys (tdesc.get (), regnum); + regnum = create_feature_i386_pkeys (tdesc.get (), regnum); return tdesc.release (); } |