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.
This commit is contained in:
Pedro Alves 2013-10-28 18:34:37 +00:00
parent 71193121ff
commit 3c4797ba74
2 changed files with 6 additions and 1 deletions

View 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

View 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