]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/infrun.c
infrun.c:handle_inferior_event: Put all ecs->random_signal tests together.
authorPedro Alves <palves@redhat.com>
Mon, 28 Oct 2013 16:39:05 +0000 (16:39 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 28 Oct 2013 16:45:02 +0000 (16:45 +0000)
commitc447ac0bfb51568d4c239dd11e016dc0281ee358
tree636aff84ed518729f7b4336ab54bf8f4a45ed8ab
parentf05e4c1115dec06d408394e2d9a529d1475f96ee
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.
gdb/ChangeLog
gdb/infrun.c