Remove dead sets/clears of ecs->random signal.
authorPedro Alves <palves@redhat.com>
Tue, 22 Oct 2013 14:11:28 +0000 (15:11 +0100)
committerTom Tromey <tromey@sourceware.org>
Fri, 25 Oct 2013 14:02:59 +0000 (14:02 +0000)
commit6d3e7a943f8bc67ceb2901500cea9c3bcaaf687a
tree4c3a7ee09baa24a52848323109bc8c341df9bac1
parent42ec045f62013faf59dc925c5b6392e627eb9975
Remove dead sets/clears of ecs->random signal.

'*ecs' is always memset by handle_inferior_event's callers, so all
these clears are unnecessary.  There's one place that sets the flag to
true, but, afterwards, before ecs->random_signal is ever read, we
reach the part of handle_inferior_even that clears ecs->random_signal,
among other things:

  clear_stop_func (ecs);
  ecs->event_thread->stepping_over_breakpoint = 0;
  bpstat_clear (&ecs->event_thread->control.stop_bpstat);
  ecs->event_thread->control.stop_step = 0;
  stop_print_frame = 1;
  ecs->random_signal = 0;
  stopped_by_random_signal = 0;

So all these ecs->random_signal accesses are dead code.

Tested on x86_64 Fedora 17.

gdb/
2013-10-22  Pedro Alves  <palves@redhat.com>

* infrun.c (handle_inferior_event) <thread hop>: Don't clear or
set ecs->random signal.
gdb/ChangeLog
gdb/infrun.c