diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-03-07 20:56:18 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-03-07 20:56:18 +0000 |
commit | af101477bc7eac1719bb5ab2e6bfbc41db92d226 (patch) | |
tree | 123d8246236c60bdeed4039ee67e85f8d512f90f | |
parent | fea24698b51210b7d1815e3c4371a6568a23601f (diff) | |
download | gdb-af101477bc7eac1719bb5ab2e6bfbc41db92d226.zip gdb-af101477bc7eac1719bb5ab2e6bfbc41db92d226.tar.gz gdb-af101477bc7eac1719bb5ab2e6bfbc41db92d226.tar.bz2 |
2002-03-07 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.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 14 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-64-low.c | 3 |
3 files changed, 16 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b9aebc8..acb1c39 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2002-03-07 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-06 Alexandre Oliva <aoliva@redhat.com> * configure.in (gdb_cv_bigtoc): Check for -bbigtoc on AIX. 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, diff --git a/gdb/gdbserver/linux-x86-64-low.c b/gdb/gdbserver/linux-x86-64-low.c index d176613..ffb0ce7 100644 --- a/gdb/gdbserver/linux-x86-64-low.c +++ b/gdb/gdbserver/linux-x86-64-low.c @@ -74,6 +74,3 @@ struct regset_info target_regsets[] = { x86_64_fill_fpregset, x86_64_store_fpregset }, { 0, 0, -1, NULL, NULL } }; - -#endif /* HAVE_LINUX_REGSETS */ - |