infrun.c: simplify "end stepping range" code a bit.
authorPedro Alves <palves@redhat.com>
Thu, 27 Mar 2014 18:43:59 +0000 (18:43 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 29 May 2014 17:16:06 +0000 (18:16 +0100)
commitbdc36728eee582853ca53bb8b6012e8cc3b90eb7
treef1f36eac5315abe758b71577b98e81bb8730f4f0
parent22bcd14b34126004346fa3226532dd2c1f3a9790
infrun.c: simplify "end stepping range" code a bit.

 - all end_stepping_range callers also set stop_step.

 - all places that set stop_step call end_stepping_range and
   stop_waiting too.

IOW, all places where we handle "end stepping range" do:

      ecs->event_thread->control.stop_step = 1;
      end_stepping_range ();
      stop_waiting (ecs);

Factor that out into end_stepping_range itself.

Tested on x86_64 Fedora 20.

gdb/
2014-05-29  Pedro Alves  <palves@redhat.com>

* infrun.c (process_event_stop_test, handle_step_into_function)
(handle_step_into_function_backward): Adjust.
Don't set the even thread's stop_step and call stop_waiting before
calling end_stepping_range.  Instead do that ...
(end_stepping_range): ... here.  Take an ecs pointer parameter.
gdb/ChangeLog
gdb/infrun.c