diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-10-31 20:47:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-10-31 20:47:55 +0000 |
commit | 622f62b52ee5d9ad132576a98fffc3d691d6c3ce (patch) | |
tree | 93a3f8f2d27dd73e0fb1dd0faf9c19eaaaaf6bc6 /gdb/mipsnbsd-nat.c | |
parent | 60e41137f690e63316445c95d8308403a7928d85 (diff) | |
download | gdb-622f62b52ee5d9ad132576a98fffc3d691d6c3ce.tar.gz |
* mipsnbsd-nat.c: Include "target.h" and "inf-ptrace.h".
(mipsnbsd_fetch_inferior_registers): Rename from
fetch_inferior_registers. Make static.
(mipsnbsd_store_inferior_registers): Rename from
store_inferior_registers. Make static.
(_initialize_mipsnbsd_nat): New function and prototype.
* Makefile.in (mipsnbsd-nat.o): Update dependencies.
* config/mips/nbsd.mh (NAT_CLIBS, NAT_FILE): Remove variables.
(NATDEPFILES): Remove infptrace.o and inftarg.o. Add
inf-ptrace.o.
Diffstat (limited to 'gdb/mipsnbsd-nat.c')
-rw-r--r-- | gdb/mipsnbsd-nat.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/gdb/mipsnbsd-nat.c b/gdb/mipsnbsd-nat.c index 175e6bedcea..c952bb01805 100644 --- a/gdb/mipsnbsd-nat.c +++ b/gdb/mipsnbsd-nat.c @@ -22,14 +22,16 @@ #include "defs.h" #include "inferior.h" #include "regcache.h" - -#include "mips-tdep.h" -#include "mipsnbsd-tdep.h" +#include "target.h" #include <sys/types.h> #include <sys/ptrace.h> #include <machine/reg.h> +#include "mips-tdep.h" +#include "mipsnbsd-tdep.h" +#include "inf-ptrace.h" + /* Determine if PT_GETREGS fetches this register. */ static int getregs_supplies (int regno) @@ -37,8 +39,8 @@ getregs_supplies (int regno) return ((regno) >= MIPS_ZERO_REGNUM && (regno) <= PC_REGNUM); } -void -fetch_inferior_registers (int regno) +static void +mipsnbsd_fetch_inferior_registers (int regno) { if (regno == -1 || getregs_supplies (regno)) { @@ -65,8 +67,8 @@ fetch_inferior_registers (int regno) } } -void -store_inferior_registers (int regno) +static void +mipsnbsd_store_inferior_registers (int regno) { if (regno == -1 || getregs_supplies (regno)) { @@ -101,3 +103,18 @@ store_inferior_registers (int regno) perror_with_name ("Couldn't write floating point status"); } } + + +/* Provide a prototype to silence -Wmissing-prototypes. */ +void _initialize_mipsnbsd_nat (void); + +void +_initialize_mipsnbsd_nat (void) +{ + struct target_ops *t; + + t = inf_ptrace_target (); + t->to_fetch_registers = mipsnbsd_fetch_inferior_registers; + t->to_store_registers = mipsnbsd_store_inferior_registers; + add_target (t); +} |