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:
> 
> Michael Snyder wrote:
> >
> > Fernando Nasser wrote:
> > >
> > > Michael Snyder wrote:
> > > >
> > > > 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.
> > > >
> > >
> > > As I have explained in this thread (one month ago), the single stepping
> > > caused by finish would stop as soon as foo is entered -- exactly the
> > > behavior you want.
> >
> > But that's not the behavior I want.  "Finish"
> > should take me to the function that called bar.
> > Foo did not call bar.
> 
> It depends on how you're thinking about it.  You are thinking
> "assembler", which calls bar(), stores the result and then calls foo().

No, I'm thinking "finish", which means "take me back
one stack frame."  It does not mean "and then finish
executing the line from which the call took place".
That's a separate operation.

> 
> You you think source code, the line is:
> 
> foo (bar ());
> 
> It is like peeling an onion.  The outermost shell (the last stop) is
> foo().  But before you have to go through bar() and any other inner
> calls.
> 
> --
> Fernando Nasser
> Red Hat Canada Ltd.                     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]