From 6a5c78a350526e8418a83b0275b5ce4ad0f42d7f Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 26 Sep 2004 18:42:30 +0000 Subject: * amd64-nat.h: Update copyright year. (amd64bsd_target): New prototype. * amd64bsd-nat.c: Include "target.h" and "inf-ptrace.h". (amd64bsd_target): New function. (amd64bsd_fetch_inferior_registers): Rename from fetch_inferior_registers. Make static. (amd64bsd_store_inferior_registers): Rename from store_inferior_registers. Make static. * amd64fbsd-nat.c: Include "target.h" and "fbsd-nat.h". (_initialize_amd64fbsd_nat): Construct and add target vector. * amd64nbsd-nat.o: Include "target.h". (_initialize_amd64nbsd_nat): Construct and add target vector. * amd64obsd-nat.c: Include "target.h". (_initialize_amd64obsd_nat): Construct and add target vector. * config/i386/nm-fbsd64.h (CHILD_PID_TO_EXEC_FILE): Remove define. * config/i386/fbsd64.mh (NATDEPFILES): Remove infptrace.o, inftarg.o and fbsd-proc.o. Add inf-child.o, inf-ptrace.o and fbsd-nat.o. * config/i386/nbsd64.mh, config/i386/obsd64.mh (NATDEPFILES): Remove infptrace.o and inftarg.o. Add inf-child.o and inf-ptrace.o. * Makefile.in (amd64bsd-nat.o, amd64fbsd-nat.o, amd64nbsd-nat.o) (amd64obsd-nat.o): Update dependencies. --- gdb/amd64bsd-nat.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'gdb/amd64bsd-nat.c') diff --git a/gdb/amd64bsd-nat.c b/gdb/amd64bsd-nat.c index b30885a..4393553 100644 --- a/gdb/amd64bsd-nat.c +++ b/gdb/amd64bsd-nat.c @@ -22,6 +22,7 @@ #include "defs.h" #include "inferior.h" #include "regcache.h" +#include "target.h" /* We include to make sure `struct fxsave64' is defined on NetBSD, since NetBSD's needs it. */ @@ -33,13 +34,14 @@ #include "amd64-tdep.h" #include "amd64-nat.h" +#include "inf-ptrace.h" /* 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 +amd64bsd_fetch_inferior_registers (int regnum) { if (regnum == -1 || amd64_native_gregset_supplies_p (regnum)) { @@ -69,8 +71,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 +amd64bsd_store_inferior_registers (int regnum) { if (regnum == -1 || amd64_native_gregset_supplies_p (regnum)) { @@ -105,3 +107,17 @@ store_inferior_registers (int regnum) perror_with_name ("Couldn't write floating point status"); } } + +/* Create a prototype *BSD/amd64 target. The client can override it + with local methods. */ + +struct target_ops * +amd64bsd_target (void) +{ + struct target_ops *t; + + t = inf_ptrace_target (); + t->to_fetch_registers = amd64bsd_fetch_inferior_registers; + t->to_store_registers = amd64bsd_store_inferior_registers; + return t; +} -- cgit v1.1