This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] Change xstate_bv handling to use 8 bytes of data.
- From: Pedro Alves <palves at redhat dot com>
- To: Michael Sturm <michael dot sturm at intel dot com>, mark dot kettenis at xs4all dot nl, eliz at gnu dot org
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 27 May 2016 11:35:57 +0100
- Subject: Re: [PATCH 1/4] Change xstate_bv handling to use 8 bytes of data.
- Authentication-results: sourceware.org; auth=none
- References: <1463143833-24399-1-git-send-email-michael dot sturm at intel dot com> <1463143833-24399-2-git-send-email-michael dot sturm at intel dot com>
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