aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppcobsd-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ppcobsd-nat.c')
-rw-r--r--gdb/ppcobsd-nat.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ppcobsd-nat.c b/gdb/ppcobsd-nat.c
index eac058b..0a4aaf3 100644
--- a/gdb/ppcobsd-nat.c
+++ b/gdb/ppcobsd-nat.c
@@ -1,6 +1,6 @@
/* Native-dependent code for OpenBSD/powerpc.
- Copyright 2004 Free Software Foundation, Inc.
+ Copyright 2004, 2005 Free Software Foundation, Inc.
This file is part of GDB.
@@ -30,6 +30,7 @@
#include "ppc-tdep.h"
#include "ppcobsd-tdep.h"
+#include "inf-ptrace.h"
/* OpenBSD/powerpc doesn't have PT_GETFPREGS/PT_SETFPREGS like
NetBSD/powerpc and FreeBSD/powerpc. */
@@ -37,8 +38,8 @@
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
for all registers. */
-void
-fetch_inferior_registers (int regnum)
+static void
+ppcobsd_fetch_registers (int regnum)
{
struct reg regs;
@@ -53,8 +54,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
+ppcobsd_store_registers (int regnum)
{
struct reg regs;
@@ -77,6 +78,14 @@ void _initialize_ppcobsd_nat (void);
void
_initialize_ppcobsd_nat (void)
{
+ struct target_ops *t;
+
+ /* Add in local overrides. */
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = ppcobsd_fetch_registers;
+ t->to_store_registers = ppcobsd_store_registers;
+ add_target (t);
+
/* General-purpose registers. */
ppcobsd_reg_offsets.r0_offset = offsetof (struct reg, gpr);
ppcobsd_reg_offsets.pc_offset = offsetof (struct reg, pc);