Re: [PATCH] stepi/nexti: skip signal handler if "handle nostop" signal arrives

Yao Qi
2014-10-15T11:12:11Z

Pedro Alves <palves@redhat.com> writes:

> I think that having to explain that "stepi" steps into handlers, (and
> that "nexti" wouldn't according to my reasoning above), while "step"
> does, is a sign of an awkward interface.
>

I suspect you meant "step" does NOT, right?

> diff --git a/gdb/infrun.c b/gdb/infrun.c
> index d61cc12..3682765 100644
> --- a/gdb/infrun.c
> +++ b/gdb/infrun.c
> @@ -4455,7 +4455,8 @@ handle_signal_stop (struct execution_control_state *ecs)
>
> if (ecs->event_thread->control.step_range_end != 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is it still needed?

> && ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_0
> - && pc_in_thread_step_range (stop_pc, ecs->event_thread)
> + && (pc_in_thread_step_range (stop_pc, ecs->event_thread)
> + || ecs->event_thread->control.step_range_end == 1)
> && frame_id_eq (get_stack_frame_id (frame),
> ecs->event_thread->control.step_stack_frame_id)
> && ecs->event_thread->control.step_resume_breakpoint == NULL)

--
Yao (齐尧)