mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-12 02:22:51 +00:00
gdbserver: Clear X86_XSTATE_MPX bits in xcr0 on x32
Since MPX isn't available for x32, we should clear X86_XSTATE_MPX bits on x32. PR server/31511 * linux-x86-low.cc (x86_linux_read_description): Clear X86_XSTATE_MPX bits in xcr0 on x32. Reviewed-by: Felix Willgerodt <felix.willgerodt@intel.com>
This commit is contained in:
@@ -938,6 +938,10 @@ x86_linux_read_description (void)
|
||||
xcr0 = xstateregs[(I386_LINUX_XSAVE_XCR0_OFFSET
|
||||
/ sizeof (uint64_t))];
|
||||
|
||||
/* No MPX on x32. */
|
||||
if (machine == EM_X86_64 && !is_elf64)
|
||||
xcr0 &= ~X86_XSTATE_MPX;
|
||||
|
||||
xsave_len = x86_xsave_length ();
|
||||
|
||||
/* Use PTRACE_GETREGSET if it is available. */
|
||||
|
||||
Reference in New Issue
Block a user