diff options
author | 2006-11-10 14:58:18 +0000 | |
---|---|---|
committer | 2006-11-10 14:58:18 +0000 | |
commit | 4fe40d6d003a6c9d25d6c3cd48c9d1580391d120 (patch) | |
tree | 0f6de36df51da8c7ac7f2a37038b00c2b27a570c | |
parent | Handle OpenBSD as well. (diff) | |
download | wireguard-openbsd-4fe40d6d003a6c9d25d6c3cd48c9d1580391d120.tar.xz wireguard-openbsd-4fe40d6d003a6c9d25d6c3cd48c9d1580391d120.zip |
Convert to use inf-ptrace.c.
-rw-r--r-- | gnu/usr.bin/binutils/gdb/configure.tgt | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/shnbsd-nat.c | 29 |
2 files changed, 23 insertions, 8 deletions
diff --git a/gnu/usr.bin/binutils/gdb/configure.tgt b/gnu/usr.bin/binutils/gdb/configure.tgt index 897f7fdd558..8a2c8be6545 100644 --- a/gnu/usr.bin/binutils/gdb/configure.tgt +++ b/gnu/usr.bin/binutils/gdb/configure.tgt @@ -178,7 +178,7 @@ sh-*-elf*) gdb_target=embed ;; sh-*-linux*) gdb_target=linux build_gdbserver=yes ;; -sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu | sh*-*-openbsd*) +sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu) gdb_target=nbsd ;; sh-*-nto*) gdb_target=nto ;; sh*-*-openbsd*) gdb_target=obsd ;; diff --git a/gnu/usr.bin/binutils/gdb/shnbsd-nat.c b/gnu/usr.bin/binutils/gdb/shnbsd-nat.c index db6dae58891..ba52df28fad 100644 --- a/gnu/usr.bin/binutils/gdb/shnbsd-nat.c +++ b/gnu/usr.bin/binutils/gdb/shnbsd-nat.c @@ -20,15 +20,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "defs.h" +#include "inferior.h" + #include <sys/types.h> #include <sys/ptrace.h> #include <machine/reg.h> -#include "defs.h" -#include "inferior.h" - #include "sh-tdep.h" #include "shnbsd-tdep.h" +#include "inf-ptrace.h" /* Determine if PT_GETREGS fetches this register. */ #define GETREGS_SUPPLIES(regno) \ @@ -37,8 +38,8 @@ || (regno) == MACH_REGNUM || (regno) == MACL_REGNUM \ || (regno) == SR_REGNUM) -void -fetch_inferior_registers (int regno) +static void +shnbsd_fetch_inferior_registers (int regno) { if (regno == -1 || GETREGS_SUPPLIES (regno)) { @@ -55,8 +56,8 @@ fetch_inferior_registers (int regno) } } -void -store_inferior_registers (int regno) +static void +shnbsd_store_inferior_registers (int regno) { if (regno == -1 || GETREGS_SUPPLIES (regno)) { @@ -76,3 +77,17 @@ store_inferior_registers (int regno) return; } } + +/* Provide a prototype to silence -Wmissing-prototypes. */ +void _initialize_shnbsd_nat (void); + +void +_initialize_shnbsd_nat (void) +{ + struct target_ops *t; + + t = inf_ptrace_target (); + t->to_fetch_registers = shnbsd_fetch_inferior_registers; + t->to_store_registers = shnbsd_store_inferior_registers; + add_target (t); +} |