Re: [PATCH RFA] ending-run.exp

Andrew Cagney
2001-07-09T13:47:00Z

> 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