/* Native-dependent code for Linux/x86.
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
+#include "regcache.h"
#include <sys/ptrace.h>
#include <sys/user.h>
}
else
{
- for (regno = 0; regno < ARCH_NUM_REGS; regno++)
+ for (regno = 0; regno < NUM_REGS; regno++)
{
fetch_register (regno);
}
}
else
{
- for (regno = 0; regno < ARCH_NUM_REGS; regno++)
+ for (regno = 0; regno < NUM_REGS; regno++)
{
store_register (regno);
}
/* Transfering the general-purpose registers between GDB, inferiors
and core files. */
-/* Fill GDB's register array with the genereal-purpose register values
+/* Fill GDB's register array with the general-purpose register values
in *GREGSETP. */
void
return 0;
if (ptrace (PTRACE_GETFPXREGS, tid, 0, &fpxregs) == -1)
- perror_with_name ("Couldn't read floating-point and SSE registers");
+ {
+ if (errno == EIO)
+ {
+ have_ptrace_getfpxregs = 0;
+ return 0;
+ }
+
+ perror_with_name ("Couldn't read floating-point and SSE registers");
+ }
fill_fpxregset (&fpxregs, regno);
return;
}
- internal_error ("Got request for bad register number %d.", regno);
+ internal_error (__FILE__, __LINE__,
+ "Got request for bad register number %d.", regno);
}
/* Store register REGNO back into the child process. If REGNO is -1,
return;
}
- internal_error ("Got request to store bad register number %d.", regno);
+ internal_error (__FILE__, __LINE__,
+ "Got request to store bad register number %d.", regno);
}
\f