GDB is stepping past main()
Daniel Jacobowitz
drow@false.org
Wed Jul 13 13:05:00 GMT 2005
On Wed, Jul 13, 2005 at 04:38:54PM +0400, Konstantin Karganov wrote:
> Hello, all.
>
> Why doesn't gdb stop at the main() end and continues to step further?
> Ok, it's not a big problem for human, but what should the frontend
> debugger do with unknown functions w/o source file positions?
Because the user (in your example) has asked it to step out of main.
You might want to examine global state now that the program is mostly
finished. Or you might want to debug glibc.
If you want to handle this in a debugger, try detecting when you're in
main, step, are no longer in main, and main is no longer in the
backtrace.
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Gdb
mailing list