aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-nat.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2002-07-04 12:32:29 +0000
committerPierre Muller <muller@sourceware.org>2002-07-04 12:32:29 +0000
commit9b4f1ba7ede77d776fabb9642cbeef5091e38e1d (patch)
treedf7bb7bfc72439b14137ea173ad545260a35fe5d /gdb/i386-nat.c
parent00f8375eddd0063911d7181574bf1fec7fec491b (diff)
downloadgdb-9b4f1ba7ede77d776fabb9642cbeef5091e38e1d.zip
gdb-9b4f1ba7ede77d776fabb9642cbeef5091e38e1d.tar.gz
gdb-9b4f1ba7ede77d776fabb9642cbeef5091e38e1d.tar.bz2
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.
Diffstat (limited to 'gdb/i386-nat.c')
-rw-r--r--gdb/i386-nat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index adf220b..53a81a4 100644
--- a/gdb/i386-nat.c
+++ b/gdb/i386-nat.c
@@ -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. */