i386-bsd-nat: Assume PT_GETXMMREGS is present.
NetBSD has included PT_GETXMMREGS since 1.6 released in September 2002. OpenBSD has included PT_GETXMMREGS since 3.8 released in November 2005.
This commit is contained in:
parent
63db53cd53
commit
72919b16ec
1 changed files with 0 additions and 10 deletions
|
@ -92,11 +92,9 @@ static int i386bsd_r_reg_offset[] =
|
||||||
#define GETREGS_SUPPLIES(regnum) \
|
#define GETREGS_SUPPLIES(regnum) \
|
||||||
((0 <= (regnum) && (regnum) <= 15))
|
((0 <= (regnum) && (regnum) <= 15))
|
||||||
|
|
||||||
#ifdef HAVE_PT_GETXMMREGS
|
|
||||||
/* Set to 1 if the kernel supports PT_GETXMMREGS. Initialized to -1
|
/* Set to 1 if the kernel supports PT_GETXMMREGS. Initialized to -1
|
||||||
so that we try PT_GETXMMREGS the first time around. */
|
so that we try PT_GETXMMREGS the first time around. */
|
||||||
static int have_ptrace_xmmregs = -1;
|
static int have_ptrace_xmmregs = -1;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Supply the general-purpose registers in GREGS, to REGCACHE. */
|
/* Supply the general-purpose registers in GREGS, to REGCACHE. */
|
||||||
|
@ -162,7 +160,6 @@ i386bsd_fetch_inferior_registers (struct regcache *regcache, int regnum)
|
||||||
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
|
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
|
||||||
{
|
{
|
||||||
struct fpreg fpregs;
|
struct fpreg fpregs;
|
||||||
#ifdef HAVE_PT_GETXMMREGS
|
|
||||||
char xmmregs[512];
|
char xmmregs[512];
|
||||||
|
|
||||||
if (have_ptrace_xmmregs != 0
|
if (have_ptrace_xmmregs != 0
|
||||||
|
@ -175,15 +172,12 @@ i386bsd_fetch_inferior_registers (struct regcache *regcache, int regnum)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
have_ptrace_xmmregs = 0;
|
have_ptrace_xmmregs = 0;
|
||||||
#endif
|
|
||||||
if (gdb_ptrace (PT_GETFPREGS, ptid,
|
if (gdb_ptrace (PT_GETFPREGS, ptid,
|
||||||
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
||||||
perror_with_name (_("Couldn't get floating point status"));
|
perror_with_name (_("Couldn't get floating point status"));
|
||||||
|
|
||||||
i387_supply_fsave (regcache, -1, &fpregs);
|
i387_supply_fsave (regcache, -1, &fpregs);
|
||||||
#ifdef HAVE_PT_GETXMMREGS
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +208,6 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum)
|
||||||
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
|
if (regnum == -1 || regnum >= I386_ST0_REGNUM)
|
||||||
{
|
{
|
||||||
struct fpreg fpregs;
|
struct fpreg fpregs;
|
||||||
#ifdef HAVE_PT_GETXMMREGS
|
|
||||||
char xmmregs[512];
|
char xmmregs[512];
|
||||||
|
|
||||||
if (have_ptrace_xmmregs != 0
|
if (have_ptrace_xmmregs != 0
|
||||||
|
@ -232,7 +225,6 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
have_ptrace_xmmregs = 0;
|
have_ptrace_xmmregs = 0;
|
||||||
#endif
|
|
||||||
if (gdb_ptrace (PT_GETFPREGS, ptid,
|
if (gdb_ptrace (PT_GETFPREGS, ptid,
|
||||||
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
||||||
perror_with_name (_("Couldn't get floating point status"));
|
perror_with_name (_("Couldn't get floating point status"));
|
||||||
|
@ -242,9 +234,7 @@ i386bsd_store_inferior_registers (struct regcache *regcache, int regnum)
|
||||||
if (gdb_ptrace (PT_SETFPREGS, ptid,
|
if (gdb_ptrace (PT_SETFPREGS, ptid,
|
||||||
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
(PTRACE_TYPE_ARG3) &fpregs, 0) == -1)
|
||||||
perror_with_name (_("Couldn't write floating point status"));
|
perror_with_name (_("Couldn't write floating point status"));
|
||||||
#ifdef HAVE_PT_GETXMMREGS
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue