forked from Imagelibrary/binutils-gdb
Revert "gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition"
This reverts commit 7816b81e9b.
This commit is contained in:
@@ -42,7 +42,6 @@
|
|||||||
#include "arch/amd64.h"
|
#include "arch/amd64.h"
|
||||||
#include "target-descriptions.h"
|
#include "target-descriptions.h"
|
||||||
#include "expop.h"
|
#include "expop.h"
|
||||||
#include "nat/x86-linux.h"
|
|
||||||
|
|
||||||
/* The syscall's XML filename for i386. */
|
/* The syscall's XML filename for i386. */
|
||||||
#define XML_SYSCALL_FILENAME_AMD64 "syscalls/amd64-linux.xml"
|
#define XML_SYSCALL_FILENAME_AMD64 "syscalls/amd64-linux.xml"
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
|
|
||||||
#include "i387-tdep.h"
|
#include "i387-tdep.h"
|
||||||
#include "gdbsupport/x86-xstate.h"
|
#include "gdbsupport/x86-xstate.h"
|
||||||
#include "nat/x86-linux.h"
|
|
||||||
|
|
||||||
/* The syscall's XML filename for i386. */
|
/* The syscall's XML filename for i386. */
|
||||||
#define XML_SYSCALL_FILENAME_I386 "syscalls/i386-linux.xml"
|
#define XML_SYSCALL_FILENAME_I386 "syscalls/i386-linux.xml"
|
||||||
|
|||||||
@@ -58,6 +58,26 @@ extern void i386_linux_report_signal_info (struct gdbarch *gdbarch,
|
|||||||
/* Return the target description according to XCR0. */
|
/* Return the target description according to XCR0. */
|
||||||
extern const struct target_desc *i386_linux_read_description (uint64_t xcr0);
|
extern const struct target_desc *i386_linux_read_description (uint64_t xcr0);
|
||||||
|
|
||||||
|
/* Format of XSAVE extended state is:
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
fxsave_bytes[0..463]
|
||||||
|
sw_usable_bytes[464..511]
|
||||||
|
xstate_hdr_bytes[512..575]
|
||||||
|
extended state regions (AVX, MPX, AVX512, PKRU, etc.)
|
||||||
|
};
|
||||||
|
|
||||||
|
Same memory layout will be used for the coredump NT_X86_XSTATE
|
||||||
|
representing the XSAVE extended state registers.
|
||||||
|
|
||||||
|
The first 8 bytes of the sw_usable_bytes[464..467] is the OS enabled
|
||||||
|
extended state mask, which is the same as the extended control register
|
||||||
|
0 (the XFEATURE_ENABLED_MASK register), XCR0. We can use this mask
|
||||||
|
together with the mask saved in the xstate_hdr_bytes to determine what
|
||||||
|
states the processor/OS supports and what state, used or initialized,
|
||||||
|
the process/thread is in. */
|
||||||
|
#define I386_LINUX_XSAVE_XCR0_OFFSET 464
|
||||||
|
|
||||||
extern int i386_linux_gregset_reg_offset[];
|
extern int i386_linux_gregset_reg_offset[];
|
||||||
|
|
||||||
/* Return x86 siginfo type. */
|
/* Return x86 siginfo type. */
|
||||||
|
|||||||
@@ -22,26 +22,6 @@
|
|||||||
|
|
||||||
#include "nat/linux-nat.h"
|
#include "nat/linux-nat.h"
|
||||||
|
|
||||||
/* Format of XSAVE extended state is:
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
fxsave_bytes[0..463]
|
|
||||||
sw_usable_bytes[464..511]
|
|
||||||
xstate_hdr_bytes[512..575]
|
|
||||||
extended state regions (AVX, MPX, AVX512, PKRU, etc.)
|
|
||||||
};
|
|
||||||
|
|
||||||
Same memory layout will be used for the coredump NT_X86_XSTATE
|
|
||||||
representing the XSAVE extended state registers.
|
|
||||||
|
|
||||||
The first 8 bytes of the sw_usable_bytes[464..467] is the OS enabled
|
|
||||||
extended state mask, which is the same as the extended control register
|
|
||||||
0 (the XFEATURE_ENABLED_MASK register), XCR0. We can use this mask
|
|
||||||
together with the mask saved in the xstate_hdr_bytes to determine what
|
|
||||||
states the processor/OS supports and what state, used or initialized,
|
|
||||||
the process/thread is in. */
|
|
||||||
#define I386_LINUX_XSAVE_XCR0_OFFSET 464
|
|
||||||
|
|
||||||
/* Set whether our local mirror of LWP's debug registers has been
|
/* Set whether our local mirror of LWP's debug registers has been
|
||||||
changed since the values were last written to the thread. Nonzero
|
changed since the values were last written to the thread. Nonzero
|
||||||
indicates that a change has been made, zero indicates no change. */
|
indicates that a change has been made, zero indicates no change. */
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include "gdbsupport/x86-xstate.h"
|
#include "gdbsupport/x86-xstate.h"
|
||||||
#include "nat/x86-xstate.h"
|
#include "nat/x86-xstate.h"
|
||||||
#include "nat/gdb_ptrace.h"
|
#include "nat/gdb_ptrace.h"
|
||||||
#include "nat/x86-linux.h"
|
|
||||||
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
#include "nat/amd64-linux-siginfo.h"
|
#include "nat/amd64-linux-siginfo.h"
|
||||||
@@ -833,6 +832,27 @@ x86_target::low_siginfo_fixup (siginfo_t *ptrace, gdb_byte *inf, int direction)
|
|||||||
|
|
||||||
static int use_xml;
|
static int use_xml;
|
||||||
|
|
||||||
|
/* Format of XSAVE extended state is:
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
fxsave_bytes[0..463]
|
||||||
|
sw_usable_bytes[464..511]
|
||||||
|
xstate_hdr_bytes[512..575]
|
||||||
|
avx_bytes[576..831]
|
||||||
|
future_state etc
|
||||||
|
};
|
||||||
|
|
||||||
|
Same memory layout will be used for the coredump NT_X86_XSTATE
|
||||||
|
representing the XSAVE extended state registers.
|
||||||
|
|
||||||
|
The first 8 bytes of the sw_usable_bytes[464..467] is the OS enabled
|
||||||
|
extended state mask, which is the same as the extended control register
|
||||||
|
0 (the XFEATURE_ENABLED_MASK register), XCR0. We can use this mask
|
||||||
|
together with the mask saved in the xstate_hdr_bytes to determine what
|
||||||
|
states the processor/OS supports and what state, used or initialized,
|
||||||
|
the process/thread is in. */
|
||||||
|
#define I386_LINUX_XSAVE_XCR0_OFFSET 464
|
||||||
|
|
||||||
/* Does the current host support the GETFPXREGS request? The header
|
/* Does the current host support the GETFPXREGS request? The header
|
||||||
file may or may not define it, and even if it is defined, the
|
file may or may not define it, and even if it is defined, the
|
||||||
kernel will return EIO if it's running on a pre-SSE processor. */
|
kernel will return EIO if it's running on a pre-SSE processor. */
|
||||||
|
|||||||
Reference in New Issue
Block a user