summaryrefslogtreecommitdiff
path: root/gdb/vaxbsd-nat.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-09-30 21:04:35 +0000
committerMark Kettenis <kettenis@gnu.org>2004-09-30 21:04:35 +0000
commit84c6416804a609dc29cf75d4556d1802f792dfa6 (patch)
tree5534c9c8092e3839c9c57ca1f132edc3b751e667 /gdb/vaxbsd-nat.c
parenta407815b502cb8708163d341bfe128109858142b (diff)
downloadgdb-84c6416804a609dc29cf75d4556d1802f792dfa6.tar.gz
* vaxbsd-nat.c: Include "target,h" and "inf-ptrace.h".
(vaxbsd_fetch_inferior_registers): Rename from fetch_inferior_registers. Make static. (vaxbsd_store_inferior_registers): Rename from store_inferior_registers. Make static. (_initialize_vaxbsd_nat): Construct and add target vector. * config/vax/nbsdaout.mh (NATDEPFILES): Remove infptrace.o and inftarg.o. Add inf-child.o and inf-ptrace.o. * config/vax/nbsdelf.mh (NATDEPFILES): Remove infptrace.o and inftarg.o. Add inf-child.o and inf-ptrace.o. (NAT_FILE): Remove. * config/vax/obsd.mh (NATDEPFILES): Remove infptrace.o and inftarg.o. Add inf-child.o and inf-ptrace.o. (NAT_FILE): Remove. * Makefile.in (vaxbsd-nat.o): Update dependencies.
Diffstat (limited to 'gdb/vaxbsd-nat.c')
-rw-r--r--gdb/vaxbsd-nat.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/vaxbsd-nat.c b/gdb/vaxbsd-nat.c
index b00e93db3b5..bd505be766e 100644
--- a/gdb/vaxbsd-nat.c
+++ b/gdb/vaxbsd-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 "vax-tdep.h"
+#include "inf-ptrace.h"
/* Supply the general-purpose registers stored in GREGS to REGCACHE. */
@@ -62,8 +64,8 @@ vaxbsd_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
+vaxbsd_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
+vaxbsd_store_inferior_registers (int regnum)
{
struct reg regs;
@@ -133,6 +135,13 @@ void _initialize_vaxbsd_nat (void);
void
_initialize_vaxbsd_nat (void)
{
+ struct target_ops *t;
+
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = vaxbsd_fetch_inferior_registers;
+ t->to_store_registers = vaxbsd_store_inferior_registers;
+ add_target (t);
+
/* Support debugging kernel virtual memory images. */
bsd_kvm_add_target (vaxbsd_supply_pcb);
}