This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH v2] Add support for the x86 XSAVE extended state on FreeBSD/x86.
- From: John Baldwin <jhb at freebsd dot org>
- To: gdb-patches at sourceware dot org
- Cc: binutils at sourceware dot org, Mark Kettenis <mark dot kettenis at xs4all dot nl>, Pedro Alves <palves at redhat dot com>
- Date: Wed, 01 Apr 2015 09:06:01 -0400
- Subject: Re: [PATCH v2] Add support for the x86 XSAVE extended state on FreeBSD/x86.
- Authentication-results: sourceware.org; auth=none
- References: <55149C11 dot 8000709 at FreeBSD dot org>
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.
I believe this version addresses the notes Pedro and Mark raised previously
on gdb-patches@. Does anyone on binutils@ have any comments?