merge nathanw_sa

This commit is contained in:
christos 2003-01-18 21:42:07 +00:00
parent b7af0cbc04
commit 83ddcbcf97
8 changed files with 344 additions and 137 deletions

View File

@ -90,6 +90,14 @@ supply_regs (regs)
supply_register (PC_REGNUM, regs + (31 * 8));
}
static void
unsupply_regs (regs)
struct reg *regs;
{
memcpy (&regs->r_regs[0], &registers[REGISTER_BYTE (V0_REGNUM)], 31 * 8);
memcpy (&regs->r_regs[31], &registers[REGISTER_BYTE (PC_REGNUM)], 8);
}
static void
supply_fpregs (fregs)
char *fregs;
@ -102,6 +110,42 @@ supply_fpregs (fregs)
supply_register (FPCR_REGNUM, fregs + (32 * 8));
}
static void
unsupply_fpregs (fregs)
struct fpreg *fregs;
{
memcpy (&fregs->fpr_regs[0], &registers[REGISTER_BYTE (FP0_REGNUM)], 31 * 8);
memcpy (&fregs->fpr_cr, &registers[REGISTER_BYTE (FPCR_REGNUM)], 8);
}
void
nbsd_reg_to_internal (regs)
char *regs;
{
supply_regs (regs);
}
void
nbsd_fpreg_to_internal (fregs)
char *fregs;
{
supply_fpregs (fregs);
}
void
nbsd_internal_to_reg (regs)
char *regs;
{
unsupply_regs (regs);
}
void
nbsd_internal_to_fpreg (fregs)
char *fregs;
{
unsupply_fpregs (fregs);
}
void
fetch_inferior_registers (regno)
int regno;
@ -111,15 +155,15 @@ fetch_inferior_registers (regno)
if (regno == -1 || GETREGS_SUPPLIES (regno))
{
ptrace (PT_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
ptrace (PT_GETREGS, GET_PROCESS (inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_registers, GET_LWP (inferior_pid));
supply_regs ((char *) &inferior_registers);
}
if (regno == -1 || regno >= FP0_REGNUM)
{
ptrace (PT_GETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
ptrace (PT_GETFPREGS, GET_PROCESS (inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_fp_registers, GET_LWP (inferior_pid));
supply_fpregs ((char *) &inferior_fp_registers);
}
@ -144,20 +188,20 @@ store_inferior_registers (regno)
inferior_registers.r_regs[R_ZERO] =
*(long *) &registers[REGISTER_BYTE (PC_REGNUM)];
ptrace (PT_SETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
ptrace (PT_SETREGS, GET_PROCESS (inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_registers, GET_LWP (inferior_pid));
}
if (regno == -1 || regno >= FP0_REGNUM)
{
memcpy (&inferior_fp_registers.fpr_regs[0],
&registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof(inferior_fp_registers.fpr_regs));
sizeof (inferior_fp_registers.fpr_regs));
memcpy (&inferior_fp_registers.fpr_cr,
&registers[REGISTER_BYTE (FPCR_REGNUM)],
sizeof(inferior_fp_registers.fpr_cr));
ptrace (PT_SETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
sizeof (inferior_fp_registers.fpr_cr));
ptrace (PT_SETFPREGS, GET_PROCESS (inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_fp_registers, GET_LWP (inferior_pid));
}
}

View File

@ -59,44 +59,97 @@ supply_struct_reg (struct reg *reg)
arm_apcs_32 = (read_register (PS_REGNUM) & PSR_MODE_32) != 0;
}
static void
unsupply_struct_reg (struct reg *reg)
{
int i;
for (i = 0; i < 13; i++)
read_register_gen (A1_REGNUM + i, (char *)&reg->r[i]);
read_register_gen (SP_REGNUM, (char *)&reg->r_sp);
read_register_gen (LR_REGNUM, (char *)&reg->r_lr);
read_register_gen (PS_REGNUM, (char *)&reg->r_cpsr);
if ((reg->r_cpsr & PSR_MODE_32))
read_register_gen (PC_REGNUM, (char *)&reg->r_pc);
else
arm_read_26bit_r15 ((char *)&reg->r_pc);
}
static void
supply_struct_fpreg (struct fpreg *freg)
{
int i;
for (i = 0; i < 8; i++)
supply_register (F0_REGNUM + i, (char *)&freg->fpr[i]);
supply_register (FPS_REGNUM, (char *)&freg->fpr_fpsr);
}
static void
unsupply_struct_fpreg (struct fpreg *freg)
{
memcpy (&freg->fpr[0], &registers[REGISTER_BYTE (F0_REGNUM)], sizeof (freg->fpr));
memcpy (&freg->fpr_fpsr, &registers[REGISTER_BYTE (FPS_REGNUM)], sizeof (freg->fpr_fpsr));
}
void
nbsd_reg_to_internal (regs)
char *regs;
{
supply_struct_reg ((struct reg *)regs);
}
void
nbsd_fpreg_to_internal (fregs)
char *fregs;
{
supply_struct_fpreg ((struct fpreg *)fregs);
}
void
nbsd_internal_to_reg (regs)
char *regs;
{
unsupply_struct_reg ((struct reg *)regs);
}
void
nbsd_internal_to_fpreg (fregs)
char *fregs;
{
unsupply_struct_fpreg ((struct fpreg *)fregs);
}
void
fetch_inferior_registers (int regno)
{
struct reg inferior_registers;
struct fpreg inferior_fpregisters;
int i;
/* Integer registers */
ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inferior_registers, 0);
ptrace (PT_GETREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_registers, GET_LWP(inferior_pid));
supply_struct_reg (&inferior_registers);
/* FPA registers */
ptrace (PT_GETFPREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inferior_fpregisters,
0);
for (i = 0; i < 8; i++)
supply_register (F0_REGNUM + i, (char *)&inferior_fpregisters.fpr[i]);
supply_register (FPS_REGNUM, (char *)&inferior_fpregisters.fpr_fpsr);
ptrace (PT_GETFPREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_fpregisters, GET_LWP(inferior_pid));
supply_struct_fpreg(&inferior_fpregisters);
}
void
store_inferior_registers (int regno)
{
struct reg inferior_registers;
int i;
struct fpreg inferior_fpregisters;
for (i = 0; i < 13; i++)
read_register_gen (A1_REGNUM + i, (char *)&inferior_registers.r[i]);
read_register_gen (SP_REGNUM, (char *)&inferior_registers.r_sp);
read_register_gen (LR_REGNUM, (char *)&inferior_registers.r_lr);
if ((inferior_registers.r_cpsr & PSR_MODE_32))
read_register_gen (PC_REGNUM, (char *)&inferior_registers.r_pc);
else
arm_read_26bit_r15 ((char *)&inferior_registers.r_pc);
read_register_gen (PS_REGNUM, (char *)&inferior_registers.r_cpsr);
ptrace (PT_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inferior_registers, 0);
unsupply_struct_reg (&inferior_registers);
ptrace (PT_SETREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_registers, GET_LWP(inferior_pid));
/* XXX Set FP regs. */
unsupply_struct_fpreg (&inferior_fpregisters);
ptrace (PT_SETFPREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_registers, GET_LWP(inferior_pid));
}
struct md_core

View File

@ -38,6 +38,16 @@
#define PTRACE_ARG3_TYPE char*
/* Macros for manipulating pid/lwpid/threadid aggregates in archnbsd-nat.c and
nbsd-thread.c */
#define THREAD_FLAG 0x80000000
#define IS_THREAD(ARG) (((ARG) & THREAD_FLAG) != 0)
#define GET_THREAD(PID) (((PID) >> 16) & 0x7fff)
#define GET_LWP(PID) (((PID) >> 16) & 0x7fff)
#define GET_PROCESS(PID) ((PID) & 0xffff)
#define BUILD_THREAD(TID, PID) ((TID) << 16 | (PID) | THREAD_FLAG)
#define BUILD_LWP(TID, PID) ((TID) << 16 | (PID))
#if !defined(NO_SOLIB)
#include "solib.h" /* Support for shared libraries. */

View File

@ -409,6 +409,17 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
AC_MSG_RESULT(no)
fi
;;
netbsd*)
AC_MSG_CHECKING(for NetBSD thread debugging library)
if test -f /usr/include/pthread_dbg.h ; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_THREAD_DB_LIB)
CONFIG_OBS="${CONFIG_OBS} nbsd-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} nbsd-thread.c"
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthread_dbg"
else
AC_MSG_RESULT(no)
fi
esac
AC_SUBST(CONFIG_LDFLAGS)
fi

View File

@ -333,9 +333,10 @@ core_open (filename, from_tty)
/* Build up thread list from BFD sections. */
init_thread_list ();
#if 0 /* XXX nathanw */
bfd_map_over_sections (core_bfd, add_to_thread_list,
bfd_get_section_by_name (core_bfd, ".reg"));
#endif
if (ontop)
{
/* Fetch all registers from core file. */

View File

@ -59,8 +59,8 @@ struct xmmctx
{
unsigned short control;
unsigned short status;
unsigned char tag; /* abridged */
unsigned char r0;
unsigned char tag; /* abridged */
unsigned short opcode;
unsigned long eip;
unsigned short code_seg;
@ -105,6 +105,28 @@ supply_regs (regs)
RF (15, regs->r_gs);
}
static void
unsupply_regs (regs)
struct reg *regs;
{
RS ( 0, regs->r_eax);
RS ( 1, regs->r_ecx);
RS ( 2, regs->r_edx);
RS ( 3, regs->r_ebx);
RS ( 4, regs->r_esp);
RS ( 5, regs->r_ebp);
RS ( 6, regs->r_esi);
RS ( 7, regs->r_edi);
RS ( 8, regs->r_eip);
RS ( 9, regs->r_eflags);
RS (10, regs->r_cs);
RS (11, regs->r_ss);
RS (12, regs->r_ds);
RS (13, regs->r_es);
RS (14, regs->r_fs);
RS (15, regs->r_gs);
}
static void
supply_387regs (s87)
struct env387 *s87;
@ -126,6 +148,27 @@ supply_387regs (s87)
RF (FOP_REGNUM, s87->opcode);
}
static void
unsupply_387regs(s87)
struct env387 *s87;
{
int i;
for (i = 0; i < 8; i++)
{
RF (FP0_REGNUM + i, s87->regs[i]);
}
RS (FCTRL_REGNUM, s87->control);
RS (FSTAT_REGNUM, s87->status);
RS (FTAG_REGNUM, s87->tag);
RS (FCS_REGNUM, s87->code_seg);
RS (FCOFF_REGNUM, s87->eip);
RS (FDS_REGNUM, s87->operand_seg);
RS (FDOFF_REGNUM, s87->operand);
RS (FOP_REGNUM, s87->opcode);
}
#ifdef PT_GETXMMREGS
static void
supply_xmmregs (sxmm)
@ -209,8 +252,74 @@ supply_xmmregs (sxmm)
RF (MXCSR_REGNUM, sxmm->mxcsr);
}
static void
unsupply_xmmregs (sxmm)
struct xmmctx *sxmm;
{
unsigned short tag;
int i;
for (i = 0; i < 8; i++)
{
RS (FP0_REGNUM + i, sxmm->fpregs[i].fp_bytes);
RS (XMM0_REGNUM + i, sxmm->sseregs[i].sse_bytes);
}
/* Note: even though there's no padding after the 16-bit
registers, because we copy only as much as the destination
will hold *and* we're little-endian, this all works out
fine. */
RS (FCTRL_REGNUM, sxmm->control);
RS (FSTAT_REGNUM, sxmm->status);
RS (FCS_REGNUM, sxmm->code_seg);
RS (FCOFF_REGNUM, sxmm->eip);
RS (FDS_REGNUM, sxmm->operand_seg);
RS (FDOFF_REGNUM, sxmm->operand);
/* GDB has provided as the "tag" info in i387 format, but the
kernel expects it to be in XMM format; convert it. */
RS (FTAG_REGNUM, tag);
for (sxmm->tag = 0, i = 0; i < 8; i++)
{
if (((tag >> (i * 2)) & 3) != 3)
{
sxmm->tag |= (1U << i);
}
}
RS (MXCSR_REGNUM, sxmm->mxcsr);
}
#endif
void
nbsd_reg_to_internal(regs)
char *regs;
{
supply_regs(regs);
}
void
nbsd_fpreg_to_internal(fregs)
char *fregs;
{
supply_387regs(fregs);
}
void
nbsd_internal_to_reg(regs)
char *regs;
{
unsupply_regs(regs);
}
void
nbsd_internal_to_fpreg(regs)
char *regs;
{
unsupply_387regs(regs);
}
void
fetch_inferior_registers (regno)
int regno;
@ -221,25 +330,25 @@ fetch_inferior_registers (regno)
struct xmmctx inferior_xmmregisters;
#endif
ptrace (PT_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
ptrace (PT_GETREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_registers, GET_LWP(inferior_pid));
#ifdef PT_GETXMMREGS
if (have_ptrace_xmmregs != 0 &&
ptrace(PT_GETXMMREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_xmmregisters, 0) == 0)
ptrace(PT_GETXMMREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_xmmregisters, GET_LWP(inferior_pid)) == 0)
{
have_ptrace_xmmregs = 1;
}
else
{
ptrace (PT_GETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
ptrace (PT_GETFPREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_fpregisters, GET_LWP(inferior_pid));
have_ptrace_xmmregs = 0;
}
#else
ptrace (PT_GETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
ptrace (PT_GETFPREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_fpregisters, GET_LWP(inferior_pid));
#endif
supply_regs (&inferior_registers);
@ -267,92 +376,26 @@ store_inferior_registers (regno)
#ifdef PT_GETXMMREGS
struct xmmctx inferior_xmmregisters;
#endif
int i;
RS ( 0, inferior_registers.r_eax);
RS ( 1, inferior_registers.r_ecx);
RS ( 2, inferior_registers.r_edx);
RS ( 3, inferior_registers.r_ebx);
RS ( 4, inferior_registers.r_esp);
RS ( 5, inferior_registers.r_ebp);
RS ( 6, inferior_registers.r_esi);
RS ( 7, inferior_registers.r_edi);
RS ( 8, inferior_registers.r_eip);
RS ( 9, inferior_registers.r_eflags);
RS (10, inferior_registers.r_cs);
RS (11, inferior_registers.r_ss);
RS (12, inferior_registers.r_ds);
RS (13, inferior_registers.r_es);
RS (14, inferior_registers.r_fs);
RS (15, inferior_registers.r_gs);
unsupply_regs(&inferior_registers);
#ifdef PT_GETXMMREGS
if (have_ptrace_xmmregs != 0)
{
unsigned short tag;
for (i = 0; i < 8; i++)
{
RS (FP0_REGNUM + i, inferior_xmmregisters.fpregs[i].fp_bytes);
RS (XMM0_REGNUM + i, inferior_xmmregisters.sseregs[i].sse_bytes);
}
/* Note: even though there's no padding after the 16-bit
registers, because we copy only as much as the destination
will hold *and* we're little-endian, this all works out
fine. */
RS (FCTRL_REGNUM, inferior_xmmregisters.control);
RS (FSTAT_REGNUM, inferior_xmmregisters.status);
RS (FCS_REGNUM, inferior_xmmregisters.code_seg);
RS (FCOFF_REGNUM, inferior_xmmregisters.eip);
RS (FDS_REGNUM, inferior_xmmregisters.operand_seg);
RS (FDOFF_REGNUM, inferior_xmmregisters.operand);
RS (FOP_REGNUM, inferior_xmmregisters.opcode);
/* GDB has provided as the "tag" info in i387 format, but the
kernel expects it to be in XMM format; convert it. */
RS (FTAG_REGNUM, tag);
for (inferior_xmmregisters.tag = 0, i = 0; i < 8; i++)
{
if (((tag >> (i * 2)) & 3) != 3)
{
inferior_xmmregisters.tag |= (1U << i);
}
}
RS (MXCSR_REGNUM, inferior_xmmregisters.mxcsr);
}
unsupply_xmmregs(&inferior_xmmregisters);
else
{
#endif
for (i = 0; i < 8; i++)
{
RS (FP0_REGNUM + i, inferior_fpregisters.regs[i]);
}
unsupply_387regs(&inferior_fpregisters);
RS (FCTRL_REGNUM, inferior_fpregisters.control);
RS (FSTAT_REGNUM, inferior_fpregisters.status);
RS (FTAG_REGNUM, inferior_fpregisters.tag);
RS (FCS_REGNUM, inferior_fpregisters.code_seg);
RS (FCOFF_REGNUM, inferior_fpregisters.eip);
RS (FDS_REGNUM, inferior_fpregisters.operand_seg);
RS (FDOFF_REGNUM, inferior_fpregisters.operand);
RS (FOP_REGNUM, inferior_fpregisters.opcode);
#ifdef PT_GETXMMREGS
}
#endif
ptrace (PT_SETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers, 0);
ptrace (PT_SETREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_registers, GET_LWP(inferior_pid));
#ifdef PT_GETXMMREGS
if (have_ptrace_xmmregs != 0)
ptrace (PT_SETXMMREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_xmmregisters, 0);
ptrace (PT_SETXMMREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_xmmregisters, GET_LWP(inferior_pid));
else
#endif
ptrace (PT_SETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
ptrace (PT_SETFPREGS, GET_PROCESS(inferior_pid),
(PTRACE_ARG3_TYPE) &inferior_fpregisters, GET_LWP(inferior_pid));
}
struct md_core

View File

@ -31,6 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <sys/param.h>
#include <sys/time.h>
#include <sys/lwp.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <errno.h>
@ -380,7 +381,7 @@ set_proc_cmd(arg)
addr = (CORE_ADDR)parse_and_eval_address(arg);
/* Read the PCB address in proc structure. */
addr += (int) &((struct proc *)0)->p_addr;
addr += (int) &((struct lwp *)0)->l_addr;
if (kvread(addr, &val))
error("cannot read u area ptr");

View File

@ -45,6 +45,25 @@ supply_regs (regs)
supply_register (PC_REGNUM, regs + (36 * 4));
}
static void
unsupply_regs (regs)
struct reg *regs;
{
memcpy (regs->fixreg, &registers[REGISTER_BYTE (GP0_REGNUM)],
sizeof (regs->fixreg));
memcpy (&regs->pc, &registers[REGISTER_BYTE (PC_REGNUM)],
sizeof (regs->pc));
memcpy (&regs->cr, &registers[REGISTER_BYTE (CR_REGNUM)],
sizeof (regs->cr));
memcpy (&regs->lr, &registers[REGISTER_BYTE (LR_REGNUM)],
sizeof (regs->lr));
memcpy (&regs->ctr, &registers[REGISTER_BYTE (CTR_REGNUM)],
sizeof (regs->ctr));
memcpy (&regs->xer, &registers[REGISTER_BYTE (XER_REGNUM)],
sizeof (regs->xer));
}
static void
supply_fpregs (fregs)
char *fregs;
@ -55,6 +74,43 @@ supply_fpregs (fregs)
supply_register (FP0_REGNUM + i, fregs + (i * 8));
}
static void
unsupply_fpregs (fregs)
struct fpreg *fregs;
{
memset (fregs, 0, sizeof (*fregs));
memcpy (fregs->fpreg, &registers[REGISTER_BYTE (FP0_REGNUM)], sizeof (fregs->fpreg));
}
void
nbsd_reg_to_internal (regs)
char *regs;
{
supply_regs (regs);
}
void
nbsd_fpreg_to_internal (fregs)
char *fregs;
{
supply_fpregs (fregs);
}
void
nbsd_internal_to_reg (regs)
char *regs;
{
unsupply_regs (regs);
}
void
nbsd_internal_to_fpreg (regs)
char *regs;
{
unsupply_fpregs (regs);
}
void
fetch_inferior_registers (regno)
int regno;
@ -63,11 +119,13 @@ fetch_inferior_registers (regno)
struct fpreg inffpreg;
/* Integer registers */
ptrace(PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &infreg, 0);
ptrace (PT_GETREGS, GET_PROCESS (inferior_pid), (PTRACE_ARG3_TYPE) &infreg,
GET_LWP (inferior_pid));
supply_regs ((char *) &infreg);
/* Floating point registers */
ptrace(PT_GETFPREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inffpreg, 0);
ptrace (PT_GETFPREGS, GET_PROCESS (inferior_pid), (PTRACE_ARG3_TYPE) &inffpreg,
GET_LWP (inferior_pid));
supply_fpregs ((char *) &inffpreg);
}
@ -78,28 +136,14 @@ store_inferior_registers (regno)
struct reg infreg;
struct fpreg inffpreg;
/* Integer registers */
memcpy (infreg.fixreg, &registers[REGISTER_BYTE (GP0_REGNUM)],
sizeof (infreg.fixreg));
memcpy (&infreg.pc, &registers[REGISTER_BYTE (PC_REGNUM)],
sizeof (infreg.pc));
memcpy (&infreg.cr, &registers[REGISTER_BYTE (CR_REGNUM)],
sizeof (infreg.cr));
memcpy (&infreg.lr, &registers[REGISTER_BYTE (LR_REGNUM)],
sizeof (infreg.lr));
memcpy (&infreg.ctr, &registers[REGISTER_BYTE (CTR_REGNUM)],
sizeof (infreg.ctr));
memcpy (&infreg.xer, &registers[REGISTER_BYTE (XER_REGNUM)],
sizeof (infreg.xer));
ptrace(PT_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &infreg, 0);
unsupply_regs ((char *)&infreg);
ptrace(PT_SETREGS, GET_PROCESS (inferior_pid), (PTRACE_ARG3_TYPE) &infreg,
GET_LWP (inferior_pid));
/* Floating point registers */
memset(&inffpreg, 0, sizeof(inffpreg));
memcpy(inffpreg.fpreg, &registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof(inffpreg.fpreg));
ptrace(PT_SETFPREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inffpreg, 0);
unsupply_fpregs (&inffpreg);
ptrace (PT_SETFPREGS, GET_PROCESS (inferior_pid), (PTRACE_ARG3_TYPE) &inffpreg,
GET_LWP (inferior_pid));
}
static void