summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Muller <muller@ics.u-strasbg.fr>2002-07-09 08:28:31 +0000
committerPierre Muller <muller@ics.u-strasbg.fr>2002-07-09 08:28:31 +0000
commit782c583ccc44d8ff875e247831bbf0d33390356b (patch)
tree2a720dda2ad456a2966bf610ff5e948fbceb4759
parent9cf4ce3aad516d7e9738e5df4c0483a3dbb8d32a (diff)
downloadgdb-782c583ccc44d8ff875e247831bbf0d33390356b.tar.gz
2002-07-09 Pierre Muller <muller@ics.u-strasbg.fr>
Merge from main branch. 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.
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/config/i386/nm-i386.h4
-rw-r--r--gdb/i386-nat.c8
3 files changed, 24 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d5294f3a611..8952db40c16 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+2002-07-09 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ Merge from mainline:
+
+ 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-03 Michal Ludvig <mludvig@suse.cz>
Merge from mainline:
diff --git a/gdb/config/i386/nm-i386.h b/gdb/config/i386/nm-i386.h
index 500bf7b5942..eed05a476fa 100644
--- a/gdb/config/i386/nm-i386.h
+++ b/gdb/config/i386/nm-i386.h
@@ -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 */
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index adf220bba73..53a81a463eb 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. */