This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Thu, 26 Jul 2001 13:22:25 -0400
- CC: Fernando Nasser <fnasser at redhat dot com>, Eli Zaretskii <eliz at is dot elta dot co dot il>, Michael Snyder <msnyder at cygnus dot com>, Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>, gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat , Inc. - Toronto
- References: <Pine.SUN.3.91.1010726180932.2195D-100000@is> <3B603B33.B9B33633@redhat.com> <3B604DD6.9080708@cygnus.com>
Andrew Cagney wrote:
>
> >
> > All are the same. "step" gets into foo(), a "finish" finishes foo(),
> > but then there is bar() so you stop there next. Another "finish" and
> > you will stop on the line that follows the above lines.
> >
> > Note that a "finishi" command would leave you at the return point at
> > some PC in the middle of the above source lines.
>
> So what happens if you're sitting in foo() and type finish but the
> previous command wasn't step. Do you still find yourself in bar()?
>
The current model is that one can switch between the source and assembler debugging at any time by issuing a control command with "i" or without it. So the previous command does not matter -- what matters is if you issued "finish" or "finishi".
> >
> > 'step' should never leave you in the same line from where you've issued
> > it. That is counter intuitive, even if you had a stop-finish in the
> > middle.
>
> This actually throws me. Reading it one way it suggests that ``step ;
> finish'' should have special behavour. See question above.
>
No (see above).
> Anyway try thinking of ``finish'' as a special form of step. What
> happens if you step through foo()? When foo() exits do you jump to
> bar() or go back to the caller?
>
"step" over a subroutine return should behave like "finish" from any other point in that subroutine. A "stepi" should do what "finishi" would do.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9