From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: Michael Snyder Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] ending-run.exp Date: Fri, 13 Jul 2001 12:47:00 -0000 Message-id: <3B4F5033.CE549EAA@cygnus.com> References: <3B40EB11.A026F84D@cygnus.com> <3B4A132E.AA2DE377@cygnus.com> <3B4E3B5F.55D3@redhat.com> X-SW-Source: 2001-07/msg00328.html Michael Snyder wrote: > > Fernando Nasser wrote: > > > > Michael Snyder wrote: > > > > > > This script seems to expect that, if you step past the return from main, > > > you will end up in some sort of "start" function. > > > > > > Can anyone think of any reason why "Program exited normally" is not > > > a legitimate output to see after stepping past the return from main? > > > > > > > Sorry for the delay, I was on vacation. > > > > Well, main() is normally called from inside crt0 from some sort of "start" function. When you step past the return from main you should return to the frame above main, i.e., to after the call to main inside the "start" function in crt0. > > > > If it is not stopping there it is either a bug or some new situation that did not use to exist. > > > > I don't think we should accept "Program exited normally" until we understand a little bit more of what is actually happening when we get this message. > > The thing is, this is testing something outside of GDB. > GDB doesn't have any control over how main() is called. > I don't think "stopping in the caller of main" should be > part of GDB's expected behavior set. Besides, the test > fails on native linux, so _something_ is obviously wrong > with it... Humm... we already test stopping on the caller in other places, so I am inclined to agree with you that this does not matter much here. Nobody else has presented another reason not to do this, so lets go ahead and check your changes in. -- Fernando Nasser Red Hat - Toronto E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9