read watchpoints broken with remote targets?

Johan Rydberg jrydberg@virtutech.com
Mon Nov 14 06:23:00 GMT 2005


Daniel Jacobowitz wrote:

> Actually, I think it is the right solution.  [...]
> So a watchpoint was found not to have triggered, but failed to change
> bs->stop, so it was bogusly reported.

This is exactly the change I have done in my private repo, and it seem
to work just fine for our purposes.


--- breakpoint.c        22 Aug 2005 15:45:46 -0000      1.1
+++ breakpoint.c        20 Oct 2005 16:17:59 -0000      1.2
@@ -2624,7 +2624,7 @@
      if ((b->type == bp_hardware_watchpoint
          || b->type == bp_read_watchpoint
          || b->type == bp_access_watchpoint)
-       && !stopped_by_watchpoint)
+       && stopped_by_watchpoint == 0)
        continue;

      if (b->type == bp_hardware_breakpoint)
@@ -2741,8 +2741,13 @@
         struct value *v;
         int found = 0;

-       if (!target_stopped_data_address (&current_target, &addr))
-         continue;
+       if (!target_stopped_data_address (&current_target, &addr))
+          {
+           /* Don't stop.  */
+           bs->print_it = print_it_noop;
+           bs->stop = 0;
+            continue;
+          }
         for (v = b->val_chain; v; v = v->next)
           {
             if (VALUE_LVAL (v) == lval_memory



More information about the Gdb mailing list