[PATCH v1 1/1] Fix PR16193 - gdbserver aborts.

Mark Kettenis mark.kettenis@xs4all.nl
Mon Nov 25 15:31:00 GMT 2013


> 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.



More information about the Gdb-patches mailing list