diff options
author | jhb <jhb@FreeBSD.org> | 2015-02-23 18:38:41 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-02-23 18:38:41 +0000 |
commit | 4ee9c49971462598e86cded5dec28bd933b91fc9 (patch) | |
tree | 8d545a55b1f8a364c5e8fe792781dcb94afc7a15 /contrib/binutils | |
parent | bddd935ed9588effa40aa2a0581dc92d44e4c10c (diff) | |
download | FreeBSD-src-4ee9c49971462598e86cded5dec28bd933b91fc9.zip FreeBSD-src-4ee9c49971462598e86cded5dec28bd933b91fc9.tar.gz |
MFC 274817,274878,276801,276840,278976:
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).
Diffstat (limited to 'contrib/binutils')
-rw-r--r-- | contrib/binutils/binutils/readelf.c | 2 | ||||
-rw-r--r-- | contrib/binutils/include/elf/common.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c index d2e2aef..8d116e2c 100644 --- a/contrib/binutils/binutils/readelf.c +++ b/contrib/binutils/binutils/readelf.c @@ -9159,6 +9159,8 @@ get_freebsd_note_type (unsigned e_type) return _("NT_PROCSTAT_PSSTRINGS (ps_strings data)"); case NT_PROCSTAT_AUXV: return _("NT_PROCSTAT_AUXV (auxv data)"); + case NT_X86_XSTATE: + return _("NT_X86_XSTATE (x86 XSAVE extended state)"); default: return get_note_type(e_type); } diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h index d4d9d7b..157922a 100644 --- a/contrib/binutils/include/elf/common.h +++ b/contrib/binutils/include/elf/common.h @@ -414,6 +414,7 @@ #define NT_PROCSTAT_OSREL 14 #define NT_PROCSTAT_PSSTRINGS 15 #define NT_PROCSTAT_AUXV 16 +#define NT_X86_XSTATE 0x202 /* Note segments for core files on NetBSD systems. Note name |