This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix


Fernando Nasser wrote:
> 
> 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.

I must disagree.  Often, when you reach this line and you 
want to step into foo, you will not notice the call to bar
until it is too late and you have stepped into bar.

When that happens, the only way to reach foo is to "finish" from
bar, and then step again.

If the debugger forces the "finish" to reach the next line, 
the user will be very frustrated.

> 
> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]