aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-03-04 16:28:35 +0000
committerDaniel Jacobowitz <drow@false.org>2002-03-04 16:28:35 +0000
commitc6ecbae5ad15e451dca63d4a63dd0522d914cd9b (patch)
tree0abeb0624eec0715052ef9e80d651bc2e418b755 /gdb/gdbserver/linux-low.c
parentc2006331179769b840f47e3d9f1f55b40665177d (diff)
downloadgdb-c6ecbae5ad15e451dca63d4a63dd0522d914cd9b.zip
gdb-c6ecbae5ad15e451dca63d4a63dd0522d914cd9b.tar.gz
gdb-c6ecbae5ad15e451dca63d4a63dd0522d914cd9b.tar.bz2
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.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r--gdb/gdbserver/linux-low.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index b1e3d13..4e40d07 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -36,15 +36,18 @@
#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. */
@@ -154,6 +157,9 @@ myresume (int step, int signal)
perror_with_name ("ptrace");
}
+
+#ifdef HAVE_LINUX_USRREGS
+
#define REGISTER_RAW_SIZE(regno) register_size((regno))
int
@@ -171,10 +177,6 @@ register_addr (int regnum)
return addr;
}
-
-
-#ifdef HAVE_LINUX_USRREGS
-
/* Fetch one register. */
static void
fetch_register (int regno)
@@ -242,7 +244,7 @@ usr_store_inferior_registers (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,