aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386fbsd-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/i386fbsd-nat.c
parent3510d1f2fd97b92209998a4ddadadf19ccc0f0c1 (diff)
downloadgdb-9692934b4ce2df4304f7b38411d3d1959264c5e3.zip
gdb-9692934b4ce2df4304f7b38411d3d1959264c5e3.tar.gz
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/i386fbsd-nat.c')
-rw-r--r--gdb/i386fbsd-nat.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/gdb/i386fbsd-nat.c b/gdb/i386fbsd-nat.c
index ed07711..ca3b95d 100644
--- a/gdb/i386fbsd-nat.c
+++ b/gdb/i386fbsd-nat.c
@@ -22,19 +22,21 @@
#include "defs.h"
#include "inferior.h"
#include "regcache.h"
+#include "target.h"
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/sysctl.h>
+#include "fbsd-nat.h"
#include "i386-tdep.h"
+#include "i386bsd-nat.h"
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
+/* Resume execution of the inferior process. If STEP is nonzero,
+ single-step it. If SIGNAL is nonzero, give it that signal. */
-void
-child_resume (ptid_t ptid, int step, enum target_signal signal)
+static void
+i386fbsd_resume (ptid_t ptid, int step, enum target_signal signal)
{
pid_t pid = ptid_get_pid (ptid);
int request = PT_STEP;
@@ -119,6 +121,16 @@ void _initialize_i386fbsd_nat (void);
void
_initialize_i386fbsd_nat (void)
{
+ struct target_ops *t;
+
+ /* Add some extra features to the common *BSD/i386 target. */
+ t = i386bsd_target ();
+ t->to_resume = i386fbsd_resume;
+ t->to_pid_to_exec_file = fbsd_pid_to_exec_file;
+ t->to_find_memory_regions = fbsd_find_memory_regions;
+ t->to_make_corefile_notes = fbsd_make_corefile_notes;
+ add_target (t);
+
/* FreeBSD provides a kern.ps_strings sysctl that we can use to
locate the sigtramp. That way we can still recognize a sigtramp
if its location is changed in a new kernel. Of course this is