aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2009-06-17 06:17:32 +0000
committerPierre Muller <muller@sourceware.org>2009-06-17 06:17:32 +0000
commitea5d7a9987534b6d393a523becd3f8ce5e967641 (patch)
treeb9ade0cb6a6b3a8469ab7bfa22b17a6e555151e7
parentf1a0b864972a60c5b4161cabf831dc6bf1c381bc (diff)
downloadgdb-ea5d7a9987534b6d393a523becd3f8ce5e967641.zip
gdb-ea5d7a9987534b6d393a523becd3f8ce5e967641.tar.gz
gdb-ea5d7a9987534b6d393a523becd3f8ce5e967641.tar.bz2
* infcmd.c (post_create_inferior): Call breakpoint_re_set after target
is pushed for watchpoint promotion to hardware watchpoint.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/infcmd.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 692222c..3f91496 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-17 Pierre Muller <muller@ics.u-strasbg.fr>
+ Pedro Alves <pedro@codesourcery.com>
+
+ * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
+ is pushed for watchpoint promotion to hardware watchpoint.
+
2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
* dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 9329558..422993f 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -421,6 +421,18 @@ post_create_inferior (struct target_ops *target, int from_tty)
#endif
}
+ /* If the user sets watchpoints before execution having started,
+ then she gets software watchpoints, because GDB can't know which
+ target will end up being pushed, or if it supports hardware
+ watchpoints or not. breakpoint_re_set takes care of promoting
+ watchpoints to hardware watchpoints if possible, however, if this
+ new inferior doesn't load shared libraries or we don't pull in
+ symbols from any other source on this target/arch,
+ breakpoint_re_set is never called. Call it now so that software
+ watchpoints get a chance to be promoted to hardware watchpoints
+ if the now pushed target supports hardware watchpoints. */
+ breakpoint_re_set ();
+
observer_notify_inferior_created (target, from_tty);
}