gdb: Update x86 Linux architectures to support XSAVE layouts.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 28 Aug 2023 21:18:19 +0000 (14:18 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 28 Aug 2023 21:18:19 +0000 (14:18 -0700)
commitb42405a159450004f2e2497e2b2d81bcac85c947
tree4e6c1f8c1fd38512aad4da7a990f10aa829a796d
parent24ef2641d917695470fb2d43dabb133e3ee6678f
gdb: Update x86 Linux architectures to support XSAVE layouts.

Refactor i386_linux_core_read_xcr0 to fetch and return a corresponding
x86_xsave_layout as well as xcr0 using the size of an existing
NT_X86_XSTATE core dump to determine the offsets via
i387_guess_xsave_layout.  Use this to add an implementation of
gdbarch_core_xfer_x86_xsave_layout.

Use tdep->xsave_layout.sizeof_xsave as the size of the XSTATE register
set.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/amd64-linux-tdep.c
gdb/i386-linux-tdep.c
gdb/i386-linux-tdep.h