This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v1 1/1] Fix PR16193 - gdbserver aborts.
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: walfred dot tedeschi at intel dot com
- Cc: palves at redhat dot com, yao at codesourcery dot com, gdb-patches at sourceware dot org
- Date: Mon, 25 Nov 2013 16:18:42 +0100 (CET)
- Subject: Re: [PATCH v1 1/1] Fix PR16193 - gdbserver aborts.
- Authentication-results: sourceware.org; auth=none
- References: <1385386802-16948-1-git-send-email-walfred dot tedeschi at intel dot com> <201311251449 dot rAPEn6uZ014952 at glazunov dot sibelius dot xs4all dot nl> <AC542571535E904D8E8ADAE745D60B191B1DBFEC at IRSMSX104 dot ger dot corp dot intel dot com>
> From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
> Date: Mon, 25 Nov 2013 14:56:59 +0000
>
> Hello Mark,
>
> Ok, I Will let it symmetrical to the AVX, i.e:
>
> /* In case one of the MPX XCR0 bits is set we consider we have MPX.
> #define HAS_MPX(XCR0) ((XCR0) & I386_XSTATE_MPX) == I386_XSTATE_MPX
Still doesn't do what it says on the tin. The macro is checking if
*both* bits are set. If you want to have the code match the comment
it needs to be changed to something like:
#define HAS_MPX(XRC0) (((XRC0) & I386_XSTATE_MPX) != 0)
or you need to change the comment to state that all bits need to be set.