aboutsummaryrefslogtreecommitdiff
path: root/gdb/m88kbsd-nat.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-09-30 20:52:59 +0000
committerMark Kettenis <kettenis@gnu.org>2004-09-30 20:52:59 +0000
commitbc8ffc12f6b8d57bc1e6216149bae9d588f4e251 (patch)
tree5afafc8b1a6592cb0ec0f758963d420729afe9df /gdb/m88kbsd-nat.c
parent2739459855afeaf557aea2a585813b571da935c9 (diff)
downloadgdb-bc8ffc12f6b8d57bc1e6216149bae9d588f4e251.zip
gdb-bc8ffc12f6b8d57bc1e6216149bae9d588f4e251.tar.gz
gdb-bc8ffc12f6b8d57bc1e6216149bae9d588f4e251.tar.bz2
* m88kbsd-nat.c: Include "target.h" and "inf-ptrace.h".
(m88kbsd_fetch_inferior_registers): Rename from fetch_inferior_registers. Make static. (m88kbsd_store_inferior_registers): Rename from store_inferior_registers. Make static. (_initialize_m88kbsd_nat): New prototype and function. * config/m88k/obsd.mh (NATDEPFILES): Remove infptrace.o and inftarg.o. Add inf-child.o and inf-ptrace.o. (NAT_FILE): Remove. * Makefile.in (m88kbsd-nat.o): Update dependencies.
Diffstat (limited to 'gdb/m88kbsd-nat.c')
-rw-r--r--gdb/m88kbsd-nat.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/gdb/m88kbsd-nat.c b/gdb/m88kbsd-nat.c
index 7553c19..472eb76 100644
--- a/gdb/m88kbsd-nat.c
+++ b/gdb/m88kbsd-nat.c
@@ -22,12 +22,14 @@
#include "defs.h"
#include "inferior.h"
#include "regcache.h"
+#include "target.h"
#include <sys/types.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
#include "m88k-tdep.h"
+#include "inf-ptrace.h"
/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
@@ -62,8 +64,8 @@ m88kbsd_collect_gregset (const struct regcache *regcache,
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
for all registers. */
-void
-fetch_inferior_registers (int regnum)
+static void
+m88kbsd_fetch_inferior_registers (int regnum)
{
struct reg regs;
@@ -77,8 +79,8 @@ fetch_inferior_registers (int regnum)
/* Store register REGNUM back into the inferior. If REGNUM is -1, do
this for all registers. */
-void
-store_inferior_registers (int regnum)
+static void
+m88kbsd_store_inferior_registers (int regnum)
{
struct reg regs;
@@ -92,3 +94,18 @@ store_inferior_registers (int regnum)
(PTRACE_TYPE_ARG3) &regs, 0) == -1)
perror_with_name ("Couldn't write registers");
}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_m88kbsd_nat (void);
+
+void
+_initialize_m88kbsd_nat (void)
+{
+ struct target_ops *t;
+
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = m88kbsd_fetch_inferior_registers;
+ t->to_store_registers = m88kbsd_store_inferior_registers;
+ add_target (t);
+}