infrun.c: Don't set ecs->random_signal for "catchpoint" events (eliminate ecs->random...
authorPedro Alves <palves@redhat.com>
Thu, 14 Nov 2013 19:43:26 +0000 (19:43 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 14 Nov 2013 19:50:19 +0000 (19:50 +0000)
commitce12b0125d49c4c47813f010c8d60d4c79ff52e1
tree47945fde8ba32a02f25cfe1ff5a409b7dad62be4
parent05ba85103b9131333b829c7c1366bfdb015169a3
infrun.c: Don't set ecs->random_signal for "catchpoint" events (eliminate ecs->random_signal).

This goes a step forward in making only TARGET_WAITKIND_STOPPED talk
about signals.

There's no reason for the "catchpoint" TARGET_WAITKIND_XXXs to consult
bpstat about signals -- unlike breakpoints, all these events are
continuable, so we don't need to do a remove-break/step/reinsert-break
-like dance.  That means we don't actually need to run them through
process_event_stop_test (for the bpstat_what checks), and can just use
bpstat_causes_stop instead.  Note we were already using it in the
TARGET_WAITKIND_(V)FORKED cases.

Then, these "catchpoint" waitkinds don't need to set
ecs->random_signal for anything, because they check it immediately
afterwards (and the value they set is never used again).

gdb/
2013-11-14  Pedro Alves  <palves@redhat.com>

* infrun.c (struct execution_control_state): Remove
'random_signal' field.
(handle_syscall_event): Use bpstat_causes_stop instead of
bpstat_explains_signal.  Don't set ecs->random_signal.
(handle_inferior_event): New 'random_signal' local.
<TARGET_WAITKIND_FORKED, TARGET_WAITKIND_VFORKED,
TARGET_WAITKIND_EXECD>: Use bpstat_causes_stop instead of
bpstat_explains_signal.  Don't set ecs->random_signal.
<TARGET_WAITKIND_STOPPED>: Adjust to use local instead of
ecs->random_signal.
gdb/ChangeLog
gdb/infrun.c