This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 11/25/2013 02:51 PM, Walfred Tedeschi wrote:
> Hello All,
> 
> For clarification the macro I386_XSTATE_SIZE(XCR0) was returning for any 
> XCR0 the value 576.

I must be very dense today, sorry.  :-(  Can you point out why that
was so before the patch, and no longer is so after the patch?

>> >   /* Get I386 XSAVE extended state size.  */
>> >   #define I386_XSTATE_SIZE(XCR0) \
>> > -    (((XCR0) & I386_XSTATE_BNDCFG) != 0 ? I386_XSTATE_BNDCFG_SIZE \
>> > -       : (((XCR0) & I386_XSTATE_BNDREGS) != 0 ? I386_XSTATE_BNDCFG_SIZE \
>> > -       : (((XCR0) & I386_XSTATE_AVX_SIZE) != 0 ? I386_XSTATE_AVX_SIZE \
>> > -       : I386_XSTATE_SSE_SIZE)))
>> > +    (HAS_MPX (XCR0) ? I386_XSTATE_BNDCFG_SIZE : \
>> > +     (HAS_AVX (XCR0) ? I386_XSTATE_AVX_SIZE : I386_XSTATE_SSE_SIZE))

I'm unrolling the new macros in my head, and I can figure out why
does this now return a different value.  :-/

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]