From: Pedro Alves Date: Mon, 28 Oct 2013 18:34:37 +0000 (+0000) Subject: breakpoint.c:watchpoints_triggered: simplify a tiny bit. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c4797ba74e0b7db0db3e34b606ba9c1d0f2baf7;p=binutils-gdb.git breakpoint.c:watchpoints_triggered: simplify a tiny bit. 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 * breakpoint.c (watchpoints_triggered) : Hardcode return 1. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c8c28604bc8..8bb0385f65d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-10-28 Pedro Alves + + * breakpoint.c (watchpoints_triggered) + : Hardcode return 1. + 2013-10-28 Pedro Alves * infrun.c (process_event_stop_test): Remove unnecessary scoping diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index c630b877e0c..e172be15724 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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