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 1/4] Change xstate_bv handling to use 8 bytes of data.


On 05/13/2016 01:50 PM, Michael Sturm wrote:
> The size of the state-component bitmap as specified in
> Intel(R) 64 and IA-32 Architectures Software Developer's Manual,
> Chapter 13.4.2 is 8 bytes.
> So far, the data types used for xstate_bv_p (gdb_byte*),
> clear_bv (unsigned int) and tdep->xcr0 (uint64_t) were
> inconsistent. But, since the xstate components were still
> fitting into a single byte, the code still worked
> as expected.
> However, with the addition of the PKU feature (bit 9),
> using one byte for the bitmap will no longer be sufficient.
> 
> This patch changes related code to use 64 bit data types
> consistently and changes read/write acces of the XSAVE
> header in the regcache to use memcpy, like already done
> for register access.

Does this work on a big endian host?  The memcpy + logic on
host type looks highly suspicious.

Say, consider a x86-64 core dump loaded on a ppc64 gdb.  Or
remote debugging a x86-64 gdb from a ppc64 gdb.

Thanks,
Pedro Alves


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