+2002-03-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbserver/linux-low.c (PTRACE_XFER_TYPE): Change to long.
+ (num_regs, regmap): Move inside HAVE_LINUX_USRREGS.
+ (register_addr, REGISTER_RAW_SIZE): Likewise.
+ (usr_store_inferior_registers): Use PTRACE_XFER_TYPE.
+ * gdbserver/linux-x86-64-low.c: Remove extra #endif.
+
2002-03-03 Michal Ludvig <mludvig@suse.cz>
* MAINTAINERS (x86-64): Add myself.
#include <unistd.h>
#define PTRACE_ARG3_TYPE long
-#define PTRACE_XFER_TYPE int
+#define PTRACE_XFER_TYPE long
#ifdef HAVE_LINUX_REGSETS
static int use_regsets_p = 1;
#endif
extern int errno;
+
+#ifdef HAVE_LINUX_USRREGS
extern int num_regs;
extern int regmap[];
+#endif
/* Start an inferior process and returns its pid.
ALLARGS is a vector of program-name and args. */
perror_with_name ("ptrace");
}
+
+#ifdef HAVE_LINUX_USRREGS
+
#define REGISTER_RAW_SIZE(regno) register_size((regno))
int
return addr;
}
-
-
-#ifdef HAVE_LINUX_USRREGS
-
/* Fetch one register. */
static void
fetch_register (int regno)
if (regaddr == -1)
return;
errno = 0;
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
ptrace (PTRACE_POKEUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,