i386-fbsd-nat: Assume PT_GETXMMREGS is present.

PT_GETXMMREGS was first added in FreeBSD 6.0 released in November 2005.
The last FreeBSD release without support was 5.5 released in May 2006.
This commit is contained in:
John Baldwin
2022-03-02 14:09:55 -08:00
parent c1dae0a6a0
commit 63db53cd53

View File

@ -42,9 +42,7 @@ public:
void fetch_registers (struct regcache *, int) override;
void store_registers (struct regcache *, int) override;
#if defined(PT_GETXMMREGS) || defined(PT_GETXSTATE_INFO)
const struct target_desc *read_description () override;
#endif
void resume (ptid_t, int, enum gdb_signal) override;
@ -59,9 +57,7 @@ static i386_fbsd_nat_target the_i386_fbsd_nat_target;
static size_t xsave_len;
#endif
#ifdef HAVE_PT_GETXMMREGS
static int have_ptrace_xmmregs;
#endif
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
for all registers. */
@ -126,7 +122,6 @@ i386_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
return;
}
#endif
#ifdef HAVE_PT_GETXMMREGS
if (have_ptrace_xmmregs != 0)
{
char xmmregs[I387_SIZEOF_FXSAVE];
@ -137,7 +132,6 @@ i386_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
i387_supply_fxsave (regcache, regnum, xmmregs);
return;
}
#endif
struct fpreg fpregs;
@ -214,7 +208,6 @@ i386_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum)
return;
}
#endif
#ifdef HAVE_PT_GETXMMREGS
if (have_ptrace_xmmregs != 0)
{
char xmmregs[I387_SIZEOF_FXSAVE];
@ -228,7 +221,6 @@ i386_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum)
perror_with_name (_("Couldn't write XMM registers"));
return;
}
#endif
struct fpreg fpregs;
@ -324,7 +316,6 @@ i386fbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
}
#if defined(PT_GETXMMREGS) || defined(PT_GETXSTATE_INFO)
/* Implement the read_description method. */
const struct target_desc *
@ -334,9 +325,7 @@ i386_fbsd_nat_target::read_description ()
static int xsave_probed;
static uint64_t xcr0;
#endif
#ifdef PT_GETXMMREGS
static int xmm_probed;
#endif
#ifdef PT_GETXSTATE_INFO
if (!xsave_probed)
@ -356,7 +345,6 @@ i386_fbsd_nat_target::read_description ()
return i386_target_description (xcr0, true);
#endif
#ifdef PT_GETXMMREGS
if (!xmm_probed)
{
char xmmregs[I387_SIZEOF_FXSAVE];
@ -369,11 +357,9 @@ i386_fbsd_nat_target::read_description ()
if (have_ptrace_xmmregs)
return i386_target_description (X86_XSTATE_SSE_MASK, true);
#endif
return i386_target_description (X86_XSTATE_X87_MASK, true);
}
#endif
#if defined(HAVE_PT_GETDBREGS) && defined(USE_SIGTRAP_SIGINFO)
/* Implement the supports_stopped_by_hw_breakpoints method. */