summaryrefslogtreecommitdiff
path: root/gdb/hppabsd-nat.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-04-17 22:20:20 +0000
committerMark Kettenis <kettenis@gnu.org>2005-04-17 22:20:20 +0000
commitbc8343a4d317de144aa64a42959a773a08ea6700 (patch)
treed59a5b9507c58aeacecf980380ac75c509e0c647 /gdb/hppabsd-nat.c
parent3590530acc5b99e5226d411dd4b37a9c41b8e957 (diff)
downloadgdb-bc8343a4d317de144aa64a42959a773a08ea6700.tar.gz
* hppabsd-nat.c: Update copyright year. Include "target.h" and
"inf-ptrace.h". (hppabsd_fetch_registers): Renamed from fetch_inferior_registers; made static. (hppabsd_store_registers): Renamed from store_inferior_registers; made static. (_initialize_hppabsd_nat): New function and prototype. * config/pa/obsd.mh (NATDEPFILES): Remove infptrace.o and inftarg.o. Add inf-ptrace.o. (NAT_FILE): Remove. * Makefile.in (hppabsd-nat.o): Update dependencies.
Diffstat (limited to 'gdb/hppabsd-nat.c')
-rw-r--r--gdb/hppabsd-nat.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/gdb/hppabsd-nat.c b/gdb/hppabsd-nat.c
index a7a85e5747e..98293a00440 100644
--- a/gdb/hppabsd-nat.c
+++ b/gdb/hppabsd-nat.c
@@ -1,6 +1,6 @@
/* Native-dependent code for HP PA-RISC BSD's.
- Copyright 2004 Free Software Foundation, Inc.
+ Copyright 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
@@ -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 "hppa-tdep.h"
+#include "inf-ptrace.h"
static int
hppabsd_gregset_supplies_p (int regnum)
@@ -79,8 +81,8 @@ hppabsd_collect_gregset (const struct regcache *regcache,
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
for all registers (including the floating-point registers). */
-void
-fetch_inferior_registers (int regnum)
+static void
+hppabsd_fetch_registers (int regnum)
{
struct regcache *regcache = current_regcache;
@@ -99,8 +101,8 @@ fetch_inferior_registers (int regnum)
/* Store register REGNUM back into the inferior. If REGNUM is -1, do
this for all registers (including the floating-point registers). */
-void
-store_inferior_registers (int regnum)
+static void
+hppabsd_store_registers (int regnum)
{
if (regnum == -1 || hppabsd_gregset_supplies_p (regnum))
{
@@ -117,3 +119,18 @@ store_inferior_registers (int regnum)
perror_with_name (_("Couldn't write registers"));
}
}
+
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_hppabsd_nat (void);
+
+void
+_initialize_hppabsd_nat (void)
+{
+ struct target_ops *t;
+
+ /* Add in local overrides. */
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = hppabsd_fetch_registers;
+ t->to_store_registers = hppabsd_store_registers;
+ add_target (t);
+}