infrun.c:handle_inferior_event: Put all ecs->random_signal tests together.
I recently added a new ecs->random_signal test after the "switch back to
stepped thread" code, and before the stepping tests. Looking at
making process_event_stop_test a proper function, I realized it'd be
better to keep ecs->random_signal related code together. To do that,
I needed to factor out the "switch back to stepped thread" code to a new
function, and call it in both the "random signal" and "not random
signal" paths.
gdb/
2013-10-28 Pedro Alves <palves@redhat.com>
* infrun.c (switch_back_to_stepped_thread): New function, factored
out from handle_inferior_event.
(handle_inferior_event): Adjust to call
switch_back_to_stepped_thread. Call it also at the tail of the
random signal handling, and return, instead of also handling
random signals just before the stepping tests.