]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
breakpoint.c:watchpoints_triggered: simplify a tiny bit.
authorPedro Alves <palves@redhat.com>
Mon, 28 Oct 2013 18:34:37 +0000 (18:34 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 28 Oct 2013 18:34:37 +0000 (18:34 +0000)
I was reading this, checking the the possible returns, and this
particular path confused a tiny little.  Above we do:

  if (!stopped_by_watchpoint)
    {
...
      return 0;
    }

so any return after that always return true.

Tested on x86_64 Fedora 17.

gdb/
2013-10-28  Pedro Alves  <palves@redhat.com>

* breakpoint.c (watchpoints_triggered)
<!target_stopped_data_address>: Hardcode return 1.

gdb/ChangeLog
gdb/breakpoint.c

index c8c28604bc865991e7a37aa542a547336517d90f..8bb0385f65d7cc930f13464745499cf955b07b66 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-28  Pedro Alves  <palves@redhat.com>
+
+       * breakpoint.c (watchpoints_triggered)
+       <!target_stopped_data_address>: Hardcode return 1.
+
 2013-10-28  Pedro Alves  <palves@redhat.com>
 
        * infrun.c (process_event_stop_test): Remove unnecessary scoping
index c630b877e0c936d9d559e6a13699d2a71c8ed372..e172be157244e96e5bb068e5a5399f5e94996130 100644 (file)
@@ -4714,7 +4714,7 @@ watchpoints_triggered (struct target_waitstatus *ws)
            w->watchpoint_triggered = watch_triggered_unknown;
          }
 
-      return stopped_by_watchpoint;
+      return 1;
     }
 
   /* The target could report the data address.  Mark watchpoints