[Bug java/11443] gdb fails to show the source for main() in java programs

tromey at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jul 6 16:18:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11443



------- Additional Comments From tromey at gcc dot gnu dot org  2003-07-06 16:18 -------
I don't think this is really a gcc bug.

If you want to debug your java code, you should
put a breakpoint on the class' main method.

If you want to debug the libgcj startup code,
you can put a breakpoint on main and tell gcj
to save the temporary .c file it creates.

Both these things are useful at different times.

It would be useful to have a way to tell gdb that
a given method is the "main" method, so that GUIs
like Insight could "stop at main" in a language-
independent way.  This would require some gcc changes,
but also some gdb changes.



More information about the Gcc-bugs mailing list