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: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Subject: Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 09 Jul 2001 18:13:16 -0400
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat , Inc. - Toronto
- References: <200005192321.e4JNLEv13368@delius.kettenis.local> <3B3ABD6E.1040304@cygnus.com> <3B4A2056.4D58E307@cygnus.com> <20010709143406.A17003@nevyn.them.org>
Daniel Jacobowitz wrote:
>
> On Mon, Jul 09, 2001 at 05:21:26PM -0400, Fernando Nasser wrote:
> > W.r.t. the tests for HP and IA64 I sincerely regret that we do not
> > have two commands: "finishi" and "finish". The current behavior of
> > "finish" (stop at the assembler instruction after the call) is very
> > unsettling for someone who is doing source level debugging -- in this
> > case it should, after returning, single step until the end of the
> > sourceline where the call is ("if it is not at the beginning of a
> > source line after the return, single step to the end of it" would
> > do).
>
> I think that the current behavior of finish, while awkward, is better
> than what you're suggesting here. Suppose we have:
> foo (bar (x));
> and we want to step in to foo. There's two ways to do it; a breakpoint
> on foo, or step - finish - step.
The breakpoint is the correct way. The latter is an artifact.
> Stepping in to bar, typing finish,
> and ending up after the call to foo would be exceedingly non-intuitive.
>
This is true. But a finish would not stop after the call to foo() in this case. The stepping would be aborted as we entered foo() itself (note that I said "step", not "next"). The result is quite intuitive in this case and you just provided one good example of how we could use it -- one could go "finish"-ing until the desired function was entered (without the need to step again and without the weird thing of appearing to stop at the same line you were before).
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9