diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-09-12 13:04:41 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-09-12 13:04:41 +0000 |
commit | 5bf970f9366e676f9fdc252cc9fde31fbf84b9c4 (patch) | |
tree | 52c3bff7ebc08f7a2d1119cd538f0224f96b78f8 /gdb/ppcnbsd-nat.c | |
parent | 74013231d1989923b284265e536a13457da4907c (diff) | |
download | gdb-5bf970f9366e676f9fdc252cc9fde31fbf84b9c4.zip gdb-5bf970f9366e676f9fdc252cc9fde31fbf84b9c4.tar.gz gdb-5bf970f9366e676f9fdc252cc9fde31fbf84b9c4.tar.bz2 |
2004-09-12 Andrew Cagney <cagney@gnu.org>
* ppcnbsd-nat.c: Include "inf-ptrace.h".
(ppcnbsd_fetch_inferior_registers): Rename fetch_inferior_registers.
(ppcnbsd_store_inferior_registers): Rename store_inferior_registers.
(_initialize_ppcnbsd_nat): Create and add a NetBSD/PPC ptrace
target.
* config/powerpc/nbsd.mh (NATDEPFILES): Replace and inftarg.o with
inf-ptrace.o and inf-child.o.
* inf-ptrace.h, inf-ptrace.c, inf-child.h, inf-child.c: New files.
* Makefile.in: Update dependencies.
Diffstat (limited to 'gdb/ppcnbsd-nat.c')
-rw-r--r-- | gdb/ppcnbsd-nat.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c index 7fd84c0..6fa55d6 100644 --- a/gdb/ppcnbsd-nat.c +++ b/gdb/ppcnbsd-nat.c @@ -35,6 +35,8 @@ #include "ppc-tdep.h" #include "ppcnbsd-tdep.h" +#include "inf-ptrace.h" + /* Returns true if PT_GETREGS fetches this register. */ static int getregs_supplies (int regno) @@ -73,8 +75,8 @@ getfpregs_supplies (int regno) || regno == tdep->ppc_fpscr_regnum); } -void -fetch_inferior_registers (int regno) +static void +ppcnbsd_fetch_inferior_registers (int regno) { if (regno == -1 || getregs_supplies (regno)) { @@ -103,8 +105,8 @@ fetch_inferior_registers (int regno) } } -void -store_inferior_registers (int regno) +static void +ppcnbsd_store_inferior_registers (int regno) { if (regno == -1 || getregs_supplies (regno)) { @@ -177,6 +179,12 @@ void _initialize_ppcnbsd_nat (void); void _initialize_ppcnbsd_nat (void) { + struct target_ops *t; /* Support debugging kernel virtual memory images. */ bsd_kvm_add_target (ppcnbsd_supply_pcb); + /* Add in local overrides. */ + t = inf_ptrace_target (); + t->to_fetch_registers = ppcnbsd_fetch_inferior_registers; + t->to_store_registers = ppcnbsd_store_inferior_registers; + add_target (t); } |