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: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: RFA: [infrun.c] Fix to "nexti".
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 09 Jul 2001 17:41:58 -0400
- CC: Fernando Nasser <fnasser at redhat dot com>, gdb-patches at sources dot redhat dot com
- Organization: Red Hat , Inc. - Toronto
- References: <3A54D5D2.CCA3E45E@redhat.com> <3B3B9453.6090809@cygnus.com>
Andrew Cagney wrote:
>
> > 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''.
>
Thanks.
> 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
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9