* inferior.h (read_sp): Remove prototype.
[deliverable/binutils-gdb.git] / gdb / i386-nat.c
index 518da8855da5c4b3fd11636aaba858fe347490ad..39296bde19a4585fdd27b7d825bafd396e589360 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for the i386.
 
-   Copyright 2001, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2004, 2005, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,8 +16,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "breakpoint.h"
@@ -231,8 +231,6 @@ i386_cleanup_dregs (void)
   dr_status_mirror  = 0;
 }
 
-#ifndef LINUX_CHILD_POST_STARTUP_INFERIOR
-
 /* Reset all debug registers at each new startup to avoid missing
    watchpoints after restart.  */
 
@@ -242,8 +240,6 @@ child_post_startup_inferior (ptid_t ptid)
   i386_cleanup_dregs ();
 }
 
-#endif /* LINUX_CHILD_POST_STARTUP_INFERIOR */
-
 /* Print the values of the mirrored debug registers.  This is called
    when maint_show_dr is non-zero.  To set that up, type "maint
    show-debug-regs" at GDB's prompt.  */
@@ -629,12 +625,13 @@ i386_stopped_by_hwbp (void)
   return 0;
 }
 
-/* Insert a hardware-assisted breakpoint at address ADDR.  SHADOW is
-   unused.  Return 0 on success, EBUSY on failure.  */
+/* Insert a hardware-assisted breakpoint at BP_TGT->placed_address.
+   Return 0 on success, EBUSY on failure.  */
 int
-i386_insert_hw_breakpoint (CORE_ADDR addr, void *shadow)
+i386_insert_hw_breakpoint (struct bp_target_info *bp_tgt)
 {
   unsigned len_rw = i386_length_and_rw_bits (1, hw_execute);
+  CORE_ADDR addr = bp_tgt->placed_address;
   int retval = i386_insert_aligned_watchpoint (addr, len_rw) ? EBUSY : 0;
 
   if (maint_show_dr)
@@ -643,13 +640,14 @@ i386_insert_hw_breakpoint (CORE_ADDR addr, void *shadow)
   return retval;
 }
 
-/* Remove a hardware-assisted breakpoint at address ADDR.  SHADOW is
-   unused.  Return 0 on success, -1 on failure.  */
+/* Remove a hardware-assisted breakpoint at BP_TGT->placed_address.
+   Return 0 on success, -1 on failure.  */
 
 int
-i386_remove_hw_breakpoint (CORE_ADDR addr, void *shadow)
+i386_remove_hw_breakpoint (struct bp_target_info *bp_tgt)
 {
   unsigned len_rw = i386_length_and_rw_bits (1, hw_execute);
+  CORE_ADDR addr = bp_tgt->placed_address;
   int retval = i386_remove_aligned_watchpoint (addr, len_rw);
 
   if (maint_show_dr)
This page took 0.024272 seconds and 4 git commands to generate.