diff options
author | Pedro Alves <palves@redhat.com> | 2013-10-28 18:34:37 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-10-28 18:34:37 +0000 |
commit | 3c4797ba74e0b7db0db3e34b606ba9c1d0f2baf7 (patch) | |
tree | c95a2cf50e696712b6fd29459e01599bb9dd6d05 /gdb | |
parent | 71193121ff7a6ee95fff5eb9d8ae378390ecdf45 (diff) | |
download | gdb-3c4797ba74e0b7db0db3e34b606ba9c1d0f2baf7.zip gdb-3c4797ba74e0b7db0db3e34b606ba9c1d0f2baf7.tar.gz gdb-3c4797ba74e0b7db0db3e34b606ba9c1d0f2baf7.tar.bz2 |
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 <palves@redhat.com>
* breakpoint.c (watchpoints_triggered)
<!target_stopped_data_address>: Hardcode return 1.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/breakpoint.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c8c2860..8bb0385 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 level and reindent. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index c630b87..e172be1 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 |