svn commit: r274817 - in head: contrib/binutils/binutils contrib/binutils/include/elf sys/amd64/amd64 sys/compat/ia32 sys/i386/i386 sys/i386/isa sys/kern sys/sys sys/x86/include usr.bin/gcore

John Baldwin jhb at freebsd.org
Fri Nov 21 21:09:05 UTC 2014


On Friday, November 21, 2014 08:53:18 PM John Baldwin wrote:
> Author: jhb
> Date: Fri Nov 21 20:53:17 2014
> New Revision: 274817
> URL: https://svnweb.freebsd.org/changeset/base/274817
> 
> Log:
>   Improve support for XSAVE with debuggers.
>   - Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed
>     to match what Linux does in that 1) it dumps the entire XSAVE area
>     including the fxsave state, and 2) it stashes a copy of the current
>     xsave mask in the unused padding between the fxsave state and the
>     xstate header at the same location used by Linux.
>   - Teach readelf() to recognize NT_X86_XSTATE notes.
>   - Change PT_GET/SETXSTATE to take the entire XSAVE state instead of
>     only the extra portion. This avoids having to always make two
>     ptrace() calls to get or set the full XSAVE state.
>   - Add a PT_GET_XSTATE_INFO which returns the length of the current
>     XSTATE save area (so the size of the buffer needed for PT_GETXSTATE)
>     and the current XSAVE mask (%xcr0).
> 
>   Differential Revision:	https://reviews.freebsd.org/D1193
>   Reviewed by:	kib
>   MFC after:	2 weeks

I have modified GDB 7 to handle XSAVE (including AVX) for both amd64 and i386.
I hope to get it upstreamed into the port (and hopefully to gdb itself at
some point).  You can find the changes at github/bsdjhb/gdb/freebsd-7.8-xsave
if you are curious.  I don't plan on merging this to the in-tree gdb at all
as it doesn't have any notion of XSAVE at all (whereas for gdb7 I only had to
add FreeBSD-specific bits).  One other note is that the AVX gdb branch above 
does not work with threads.  I have some other changes to simplify some of
the thread code in gdb7 that needs to go in first before the AVX patches at
which point AVX debugging should work with threads.

-- 
John Baldwin


More information about the svn-src-head mailing list