From ba0cd1113edb2f8d7e4440d923a8117a90816951 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 30 Sep 2004 21:04:35 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 16 ++++++++++++++++ gdb/Makefile.in | 2 +- gdb/config/vax/nbsdaout.mh | 3 ++- gdb/config/vax/nbsdelf.mh | 4 ++-- gdb/config/vax/obsd.mh | 4 ++-- gdb/vaxbsd-nat.c | 17 +++++++++++++---- 6 files changed, 36 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 165e1588a5f..8c8e5b2a7f3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,21 @@ 2004-09-30 Mark Kettenis + * 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. + * m88kbsd-nat.c: Include "target.h" and "inf-ptrace.h". (m88kbsd_fetch_inferior_registers): Rename from fetch_inferior_registers. Make static. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7cdfafada3d..7b9ed712f3d 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2655,7 +2655,7 @@ values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \ $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h) vaxbsd-nat.o: vaxbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ - $(vax_tdep_h) $(bsd_kvm_h) + $(target_h) $(vax_tdep_h) $(inf_ptrace_h) $(bsd_kvm_h) vax-nat.o: vax-nat.c $(defs_h) $(inferior_h) $(gdb_assert_h) $(vax_tdep_h) vaxnbsd-tdep.o: vaxnbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ $(vax_tdep_h) $(solib_svr4_h) $(gdb_string_h) diff --git a/gdb/config/vax/nbsdaout.mh b/gdb/config/vax/nbsdaout.mh index 688713530d0..7f820dbc49e 100644 --- a/gdb/config/vax/nbsdaout.mh +++ b/gdb/config/vax/nbsdaout.mh @@ -1,5 +1,6 @@ # Host: NetBSD/vax a.out -NATDEPFILES= vaxbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o \ +NATDEPFILES= fork-child.o inf-child.o inf-ptrace.o \ + vaxbsd-nat.o bsd-kvm.o \ solib.o solib-sunos.o NAT_FILE= nm-nbsdaout.h diff --git a/gdb/config/vax/nbsdelf.mh b/gdb/config/vax/nbsdelf.mh index 06dda18f70a..7eddca754a6 100644 --- a/gdb/config/vax/nbsdelf.mh +++ b/gdb/config/vax/nbsdelf.mh @@ -1,5 +1,5 @@ # Host: NetBSD/vax ELF -NATDEPFILES= vaxbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o -NAT_FILE= config/nm-nbsd.h +NATDEPFILES= fork-child.o inf-child.o inf-ptrace.o \ + vaxbsd-nat.o bsd-kvm.o LOADLIBES= -lkvm diff --git a/gdb/config/vax/obsd.mh b/gdb/config/vax/obsd.mh index 416f2c62d14..e9eab64cd4c 100644 --- a/gdb/config/vax/obsd.mh +++ b/gdb/config/vax/obsd.mh @@ -1,5 +1,5 @@ # Host: OpenBSD/vax -NATDEPFILES= vaxbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o -NAT_FILE= config/nm-bsd.h +NATDEPFILES= fork-child.o inf-child.o inf-ptrace.o \ + vaxbsd-nat.o bsd-kvm.o LOADLIBES= -lkvm 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 #include #include #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); } -- 2.30.2