Skip to content
Commit 86888358 authored by Andrew Burgess's avatar Andrew Burgess
Browse files

gdb/arch: assert that X86_XSTATE_MPX is not set for x32

While rebasing this series[1] past this commit:

  commit 4bb20a62
  Date:   Wed Mar 20 04:13:18 2024 -0700

      gdbserver: Clear X86_XSTATE_MPX bits in xcr0 on x32

I worried that there could be other paths that might result in an xcr0
value which has X86_XSTATE_MPX set in x32 mode.  As everyone
eventually calls amd64_create_target_description to build their target
description, I figured we could assert in here that if X86_XSTATE_MPX
is set then we should not be an x32 target, this will uncover any
other bugs in this area.

I'm not currently able to build/run any x32 binaries, so I have no way
to test this, but the author of commit 4bb20a62 did test this
series with that assert in place and didn't see any problems.

[1] https://inbox.sourceware.org/gdb-patches/cover.1714143669.git.aburgess@redhat.com

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31511



Approved-By: default avatarFelix Willgerodt <felix.willgerodt@intel.com>
parent 0c58b372
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment