2002-07-04 Pierre Muller <muller@ics.u-strasbg.fr>
authorPierre Muller <muller@sourceware.org>
Thu, 4 Jul 2002 12:32:29 +0000 (12:32 +0000)
committerPierre Muller <muller@sourceware.org>
Thu, 4 Jul 2002 12:32:29 +0000 (12:32 +0000)
* i386-nat.c (child_post_startup_inferior): New function
calling i386_cleanup_dregs if
I386_USE_GENERIC_WATCHPOINTS is defined.
* config/i386/nm-i386.h: define CHILD_POST_STARTUP_INFERIOR
conditional to acknowledge that i386-nat.c has its
own child_post_startup_inferior function.

gdb/ChangeLog
gdb/config/i386/nm-i386.h
gdb/i386-nat.c

index 513ae245599b2d9502b6d559b1c6f2066b75f5ed..9a7d8e9aa262af49b818b57289ef0eface190ccc 100644 (file)
@@ -1,3 +1,12 @@
+2002-07-04  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * i386-nat.c (child_post_startup_inferior): New function
+       calling i386_cleanup_dregs if
+       I386_USE_GENERIC_WATCHPOINTS is defined.
+       * config/i386/nm-i386.h: define CHILD_POST_STARTUP_INFERIOR
+       conditional to acknowledge that i386-nat.c has its
+       own child_post_startup_inferior function.
+
 2002-07-04  Mark Kettenis  <kettenis@gnu.org>
 
        * i386-tdep.h (I386_MAX_REGISTER_SIZE): New define.
index 500bf7b59423b3601918e33078691a217741a3d4..eed05a476fa3bb1effa2fc9a98ab43c5db1a6665 100644 (file)
@@ -115,6 +115,10 @@ extern int  i386_remove_hw_breakpoint (CORE_ADDR addr, void *shadow);
 
 #define DECR_PC_AFTER_HW_BREAK 0
 
+/* child_post_startup_inferior used to
+   reset all debug registers by calling i386_cleanup_dregs ().  */ 
+#define CHILD_POST_STARTUP_INFERIOR
+
 #endif /* I386_USE_GENERIC_WATCHPOINTS */
 
 #endif /* NM_I386_H */
index adf220bba730d05cd2b37ad9f9de03ebe56a3ab7..53a81a463eb1d2bd7cf1f84dfa4bbfdc3034ec56 100644 (file)
@@ -230,6 +230,14 @@ i386_cleanup_dregs (void)
   dr_status_mirror  = 0;
 }
 
+/* Reset all debug registers at each new startup
+   to avoid missing watchpoints after restart.  */
+void
+child_post_startup_inferior (ptid_t ptid)
+{
+  i386_cleanup_dregs ();
+}
+
 /* 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.  */