aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386bsd-nat.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-09-19 20:49:26 +0000
committerMark Kettenis <kettenis@gnu.org>2004-09-19 20:49:26 +0000
commit9692934b4ce2df4304f7b38411d3d1959264c5e3 (patch)
tree2ce7389eea6c9b5e8469ba087b1879dd28d7d53f /gdb/i386bsd-nat.c
parent3510d1f2fd97b92209998a4ddadadf19ccc0f0c1 (diff)
downloadfsf-binutils-gdb-9692934b4ce2df4304f7b38411d3d1959264c5e3.zip
fsf-binutils-gdb-9692934b4ce2df4304f7b38411d3d1959264c5e3.tar.gz
fsf-binutils-gdb-9692934b4ce2df4304f7b38411d3d1959264c5e3.tar.bz2
* i386bsd-nat.c: Include "i386bsd-nat.h" and "inf-ptrace.h".
(i386bsd_fetch_inferior_registers): Rename from fetch_inferior_registers. Make static. (i386bsd_store_inferior_registers): Rename from store_inferior_registers. Make static. (i386bsd_target): New function. * i386bsd-nat.h: New file. * i386fbsd-nat.c: Include "target.h", "fbsd-nat.h" and "i386bsd-nat.h". (i386fbsd_resume): Rename from child_resume. Make static. (_initialize_i386fbsd_nat): Construct and add target vector. * i386nbsd-nat.c: Include "target.h" and "i386bsd-nat.h". (_initialize_i386nbsd_nat): Construct and add target vector. * config/i386/nm-fbsd.h: (CHILD_RESUME, CHILD_PID_TO_EXEC_FILE): Remove defines. * config/i386/fbsd.mh (NATDEPFILES): Add inf-child.o, inf-ptrace.o and fbsd-nat.o. Remove inftarg.o and fbsd-proc.o. * config/i386/nbsdaout.mh (NATDEPFILES): Add inf-child.o, inf-ptrace.o, i386bsd-nat.o and bsd-kvm.o. Remove inftarg.o. (LOADLIBES): New variable. * config/i386/nbsdelf.mh (NATDEPFILES): Add inf-child.o and inf-ptrace.o. Remove inftarg.o. * config/i386/obsd.mh (NATDEPFILES): Add inf-child.o and inf-ptrace.o. Remove inftarg.o. * config/i386/obsdaout.mh (NATDEPFILES): Add inf-child.o, inf-ptrace.o, i386nbsd-nat.o and bsd-kvm.o. Remove inftarg.o. (LOADLIBES): New variable. * Makefile.in (i386bsd_nat_h): New variable. (i386bsd-nat.o, i386fbsd-nat.o, i386nbsd-nat.o): Update dependencies.
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 f54d2f0..349112a 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. */