2000-03-21 Eli Zaretskii <eliz@is.elta.co.il>
authorMichael Snyder <msnyder@vmware.com>
Tue, 21 Mar 2000 20:41:39 +0000 (20:41 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 21 Mar 2000 20:41:39 +0000 (20:41 +0000)
        * breakpoint.c (bpstat_stop_status): Don't stop if a read
        watchpoint appears to break, but the watched value changed.

gdb/ChangeLog
gdb/breakpoint.c

index bca417d7a51351da96c5bb04a973b5131003aa0d..2a4df9b8f71262fdbbafaee10d9bd8a0996595f2 100644 (file)
@@ -1,3 +1,8 @@
+2000-03-21  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * breakpoint.c (bpstat_stop_status): Don't stop if a read
+       watchpoint appears to break, but the watched value changed.
+
 2000-03-21  Jim Blandy  <jimb@redhat.com>
 
        * gdbarch.sh: Emit a definition and declaration for gdbarch_free,
index b77a404d1a1f9d3feca2e9a9cbd10581a3277ff8..4e0fc6739697e1bfa90d74d02c3cf5a73acc94c3 100644 (file)
@@ -2619,6 +2619,17 @@ bpstat_stop_status (pc, not_a_breakpoint)
              /* Stop.  */
              break;
            case WP_VALUE_CHANGED:
+             if (b->type == bp_read_watchpoint)
+               {
+                 /* Don't stop: read watchpoints shouldn't fire if
+                    the value has changed.  This is for targets which
+                    cannot set read-only watchpoints.  */
+                 bs->print_it = print_it_noop;
+                 bs->stop = 0;
+                 continue;
+               }
+             ++(b->hit_count);
+             break;
            case WP_VALUE_NOT_CHANGED:
              /* Stop.  */
              ++(b->hit_count);