This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] ending-run.exp
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: [PATCH RFA] ending-run.exp
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 09 Jul 2001 16:47:47 -0400
- Cc: Michael Snyder <msnyder at cygnus dot com>,gdb-patches at sources dot redhat dot com
- References: <3B40EB11.A026F84D@cygnus.com> <3B4A132E.AA2DE377@cygnus.com>
> 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.
Ulgh, that problem. At present GDB's behavour is poorly define
for when it comes to what to do with the bottom (outer most) stack
frames. For instance backtrace code sometimes includes _start but
sometimes does not.
There needs to be a consistent story as to what is reasonable. With
that in mind I can image a GDB that does something like:
(gdb)
4: return 0;
(gdb) list
main ()
{
printf ("Hello World\n");
return 0;
}
(gdb) step
File has no symbols, single stepping until exit
Program exited normally.
(gdb)
Andrew