X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fi386fbsd-nat.c;h=266ca22dec988d6afbf47a5bb63c9bccadfe6981;hb=37cc8bfee6166ea05f1fa2e7d9f0f4d90663b7fc;hp=14b5751e6c4f5122be5a72575cd6c119aee90fa9;hpb=9b254dd1ce46c19dde1dde5b8d1e22e862dfacce;p=binutils-gdb.git diff --git a/gdb/i386fbsd-nat.c b/gdb/i386fbsd-nat.c index 14b5751e6c4..266ca22dec9 100644 --- a/gdb/i386fbsd-nat.c +++ b/gdb/i386fbsd-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for FreeBSD/i386. - Copyright (C) 2001, 2002, 2003, 2004, 2007, 2008 + Copyright (C) 2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GDB. @@ -29,13 +29,15 @@ #include "fbsd-nat.h" #include "i386-tdep.h" +#include "i386-nat.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. */ static void -i386fbsd_resume (ptid_t ptid, int step, enum target_signal signal) +i386fbsd_resume (struct target_ops *ops, + ptid_t ptid, int step, enum target_signal signal) { pid_t pid = ptid_get_pid (ptid); int request = PT_STEP; @@ -125,6 +127,20 @@ _initialize_i386fbsd_nat (void) /* Add some extra features to the common *BSD/i386 target. */ t = i386bsd_target (); + +#ifdef HAVE_PT_GETDBREGS + + i386_use_watchpoints (t); + + i386_dr_low.set_control = i386bsd_dr_set_control; + i386_dr_low.set_addr = i386bsd_dr_set_addr; + i386_dr_low.reset_addr = i386bsd_dr_reset_addr; + i386_dr_low.get_status = i386bsd_dr_get_status; + i386_set_debug_register_length (4); + +#endif /* HAVE_PT_GETDBREGS */ + + 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;