[PATCH v4 00/13] Handle variable XSAVE layouts

John Baldwin jhb@FreeBSD.org
Sat Mar 18 01:08:52 GMT 2023


Changes since V3:

Addressed feedback from Jini.

Rebased to recent master (last version was from May).

Aleksandar Paunovic (2):
  gdbserver: Refactor the legacy region within the xsave struct
  gdbserver: Read offsets of the XSAVE extended region via CPUID

John Baldwin (11):
  x86: Add an x86_xsave_layout structure to handle variable XSAVE
    layouts.
  core: Support fetching TARGET_OBJECT_X86_XSAVE_LAYOUT from
    architectures.
  nat/x86-cpuid.h: Add x86_cpuid_count wrapper around __get_cpuid_count.
  x86 nat: Add helper functions to save the XSAVE layout for the host.
  gdb: Update x86 FreeBSD architectures to support XSAVE layouts.
  gdb: Support XSAVE layouts for the current host in the FreeBSD x86
    targets.
  gdb: Update x86 Linux architectures to support XSAVE layouts.
  gdb: Support XSAVE layouts for the current host in the Linux x86
    targets.
  gdb: Use x86_xstate_layout to parse the XSAVE extended state area.
  gdbserver: Add a function to set the XSAVE mask and size.
  x86: Remove X86_XSTATE_SIZE and related constants.

 gdb/amd64-fbsd-nat.c       |  40 +--
 gdb/amd64-fbsd-tdep.c      |  13 +-
 gdb/amd64-linux-nat.c      |   6 +-
 gdb/amd64-linux-tdep.c     |  11 +-
 gdb/configure.nat          |   8 +-
 gdb/corelow.c              |  22 ++
 gdb/gdbarch-gen.h          |  10 +
 gdb/gdbarch.c              |  32 +++
 gdb/gdbarch_components.py  |  13 +
 gdb/i386-fbsd-nat.c        |  39 +--
 gdb/i386-fbsd-tdep.c       |  81 +++---
 gdb/i386-fbsd-tdep.h       |  11 +-
 gdb/i386-linux-nat.c       |   8 +-
 gdb/i386-linux-tdep.c      |  77 +++---
 gdb/i386-linux-tdep.h      |  23 +-
 gdb/i386-tdep.c            |  36 ++-
 gdb/i386-tdep.h            |   4 +
 gdb/i387-tdep.c            | 522 +++++++++++++++++++++++--------------
 gdb/i387-tdep.h            |   9 +
 gdb/nat/x86-cpuid.h        |  27 ++
 gdb/nat/x86-xstate.c       |  65 +++++
 gdb/nat/x86-xstate.h       |  35 +++
 gdb/target.h               |   2 +
 gdb/x86-fbsd-nat.c         |  51 ++++
 gdb/x86-fbsd-nat.h         |  29 ++-
 gdb/x86-linux-nat.c        |  33 +++
 gdb/x86-linux-nat.h        |  11 +
 gdbserver/configure.srv    |  12 +-
 gdbserver/i387-fp.cc       | 312 +++++++++++++---------
 gdbserver/i387-fp.h        |   2 +-
 gdbserver/linux-x86-low.cc |  10 +-
 gdbsupport/x86-xstate.h    |  69 +++--
 32 files changed, 1134 insertions(+), 489 deletions(-)
 create mode 100644 gdb/nat/x86-xstate.c
 create mode 100644 gdb/nat/x86-xstate.h

-- 
2.39.1



More information about the Gdb-patches mailing list