summaryrefslogtreecommitdiff
path: root/gdb/i386bsd-nat.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-09-21 20:44:23 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-09-21 20:44:23 +0000
commit1b4c63dda5cd2b37f964092a5c53b865e172ff55 (patch)
tree2922f92b03a4d8e43376ae32c18a7063b86b45e2 /gdb/i386bsd-nat.c
parentfca010d7bfaeb7657a222ae31a1ac6d2ff8b22a9 (diff)
downloadgdb-1b4c63dda5cd2b37f964092a5c53b865e172ff55.tar.gz
Diffstat (limited to 'gdb/i386bsd-nat.c')
-rw-r--r--gdb/i386bsd-nat.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index f54d2f0fb72..349112a4ad0 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -33,6 +33,8 @@
#include "i386-tdep.h"
#include "i387-tdep.h"
+#include "i386bsd-nat.h"
+#include "inf-ptrace.h"
/* In older BSD versions we cannot get at some of the segment
@@ -128,8 +130,8 @@ i386bsd_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
+i386bsd_fetch_inferior_registers (int regnum)
{
if (regnum == -1 || GETREGS_SUPPLIES (regnum))
{
@@ -178,8 +180,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
+i386bsd_store_inferior_registers (int regnum)
{
if (regnum == -1 || GETREGS_SUPPLIES (regnum))
{
@@ -235,6 +237,20 @@ store_inferior_registers (int regnum)
#endif
}
}
+
+/* Create a prototype *BSD/i386 target. The client can override it
+ with local methods. */
+
+struct target_ops *
+i386bsd_target (void)
+{
+ struct target_ops *t;
+
+ t = inf_ptrace_target ();
+ t->to_fetch_registers = i386bsd_fetch_inferior_registers;
+ t->to_store_registers = i386bsd_store_inferior_registers;
+ return t;
+}
/* Support for debug registers. */