This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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 v2] Add support for the x86 XSAVE extended state on FreeBSD/x86.


On Thursday, March 26, 2015 04:53:53 PM John Baldwin wrote:
> Recognize NT_X86_XSTATE notes in FreeBSD process cores.  Recent
> FreeBSD versions include a note containing the XSAVE state for each
> thread in the process when XSAVE is in use.  The note stores a copy of
> the current XSAVE mask in a reserved section of the machine-defined
> XSAVE state at the same offset as Linux's NT_X86_XSTATE note.
> 
> For native processes, use the PT_GETXSTATE_INFO ptrace request to
> determine if XSAVE is enabled, and if so the active XSAVE state mask
> (that is, the value of %xcr0 for the target process) as well as the
> size of XSAVE state area.  Use the PT_GETXSTATE and PT_SETXSTATE requests
> to fetch and store the XSAVE state, respectively, in the BSD x86
> native targets.
> 
> In addition, the FreeBSD amd64 and i386 native targets now include
> "read_description" target methods to determine the correct x86 target
> description for the current XSAVE mask.  On FreeBSD amd64 this also
> properly returns an i386 target description for 32-bit binaries which
> allows the 64-bit GDB to run 32-bit binaries.
> 
> Note that the ptrace changes are in the BSD native targets, not the
> FreeBSD-specific native targets since that is where the other ptrace
> register accesses occur.  Of the other BSDs, NetBSD and DragonFly use
> XSAVE in the kernel but do not currently export the extended state via
> ptrace(2).  OpenBSD does not currently support XSAVE.

Ping?

I believe this version addresses the notes Pedro and Mark raised previously
on gdb-patches@.  Does anyone on binutils@ have any comments?

-- 
John Baldwin


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