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: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 08 Jan 2001 10:35:30 -0500
- CC: gdb-patches at sources dot redhat dot com
- Organization: Red Hat , Inc. - Toronto
- References: <3A54D5D2.CCA3E45E@redhat.com>
Ping!
Fernando Nasser wrote:
>
> A "nexti" inside a function prologue currently == continue.
> This has been broken for quite a while (24-Oct-95).
>
> Here is the fix.
>
> * infrun.c (handle_inferior_event): Handle "nexti" inside function
> prologues.
>
> --
> Fernando Nasser
> Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario M4P 2C9
>
>
> Index: infrun.c
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/infrun.c,v
> retrieving revision 1.277
> diff -c -p -r1.277 infrun.c
> *** infrun.c 2000/02/29 07:17:52 1.277
> --- infrun.c 2001/01/04 19:39:44
> *************** handle_inferior_event (struct execution_
> *** 2738,2748 ****
> {
> /* It's a subroutine call. */
>
> ! 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 presume that step_over_calls is only 0 when we're
> supposed to be stepping at the assembly language level
> ("stepi"). Just stop. */
> + /* Also, maybe we just did a "nexti" inside a prolog,
> + so we thought it was a subroutine call but it was not.
> + Stop as well. FENN */
> stop_step = 1;
> print_stop_reason (END_STEPPING_RANGE, 0);
> stop_stepping (ecs);
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9