diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-09-19 20:49:26 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-09-19 20:49:26 +0000 |
commit | e407797778e70dea95ff81861a54dbd29823204b (patch) | |
tree | 9b5d13d1256079d1258c2a8f8b5e9c934d8519eb /gdb/i386bsd-nat.c | |
parent | 8ceea9d05e4ff83ca91de2d445568a5d8f61661c (diff) | |
download | gdb-e407797778e70dea95ff81861a54dbd29823204b.tar.gz |
* 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.c | 24 |
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. */ |