This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: [infrun.c] Fix to "nexti".
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: RFA: [infrun.c] Fix to "nexti".
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 28 Jun 2001 16:32:19 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <3A54D5D2.CCA3E45E@redhat.com>
> A "nexti" inside a function prologue currently == continue.
> This has been broken for quite a while (24-Oct-95).
FYI, I've checked this in with one change, the original patch replaced
STEP_OVER_NONE with the magic number ``0''.
Michael Synder's comment, when this was submitted, was:
> Do we really have an "obvious fix" rule? It seems that there is
>> some confusion on this issue.
>
>
> We do (I think), but when you're discussing infrun.c, I'm not
> sure that any change can be regarded as "obviously correct".
> At least not in the wait_for_inferior/handle_event area.
>
> By eyeball, this change looks correct to me, or at least
> "not obviously incorrect". I would like to see it tested,
> and perhaps the best way to do that is to apply it and then
> notice if there's a sudden uptick in testsuite failures.
Andrew
> Here is the fix.
>
> * infrun.c (handle_inferior_event): Handle "nexti" inside function
> prologues.
>
> ! if (step_over_calls == STEP_OVER_NONE)
> {
> /* I presume that step_over_calls is only 0 when we're
> supposed to be stepping at the assembly language level
> ("stepi"). Just stop. */
> stop_step = 1;
> print_stop_reason (END_STEPPING_RANGE, 0);
> stop_stepping (ecs);
> --- 2738,2753 ----
> {
> /* It's a subroutine call. */
>
> ! if ((step_over_calls == 0)
> ! || ((step_range_end == 1)
> ! && in_prologue (prev_pc, ecs->stop_func_start)))
I've restored ``STEP_OVER_NONE'' in the above expression, I don't know
why fernando removed it.
Andrew