Summary: | gdbserver doesn't work on x32 | ||
---|---|---|---|
Product: | gdb | Reporter: | H.J. Lu <hjl.tools> |
Component: | server | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tromey |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | 15.1 | ||
Host: | Target: | x86-64 | |
Build: | Last reconfirmed: |
Description
H.J. Lu
2024-03-19 15:21:32 UTC
The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4bb20a6244b7091a9a7a2ae35dfbd7e8db27550a commit 4bb20a6244b7091a9a7a2ae35dfbd7e8db27550a Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 20 04:13:18 2024 -0700 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> Fixed. The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=efba976d9713a92b4507ccfef2257e4589da2798 commit efba976d9713a92b4507ccfef2257e4589da2798 Author: Andrew Burgess <aburgess@redhat.com> Date: Sat Mar 23 16:17:36 2024 +0000 gdb/arch: assert that X86_XSTATE_MPX is not set for x32 While trying to merge this commit: commit 4bb20a6244b7091a9a7a2ae35dfbd7e8db27550a Date: Wed Mar 20 04:13:18 2024 -0700 gdbserver: Clear X86_XSTATE_MPX bits in xcr0 on x32 With this patch series of mine: https://inbox.sourceware.org/gdb-patches/cover.1706801009.git.aburgess@redhat.com I worried that there could be other paths that could result in an xcr0 value that 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 should 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. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31511 The master branch has been updated by Andrew Burgess <aburgess@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=868883583e7520ff1bd99fcb224d2b33a990edff commit 868883583e7520ff1bd99fcb224d2b33a990edff Author: Andrew Burgess <aburgess@redhat.com> Date: Sat Mar 23 16:17:36 2024 +0000 gdb/arch: assert that X86_XSTATE_MPX is not set for x32 While rebasing this series[1] past this commit: commit 4bb20a6244b7091a9a7a2ae35dfbd7e8db27550a 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 4bb20a6244b7091 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: Felix Willgerodt <felix.willgerodt@intel.com> |