[Bug java/11443] New: gdb fails to show the source for main() in java programs
debian-gcc at lists dot debian dot org
gcc-bugzilla@gcc.gnu.org
Sun Jul 6 12:25: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
Summary: gdb fails to show the source for main() in java programs
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: debian-gcc at lists dot debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-linux
GCC host triplet: i386-linux
GCC target triplet: i386-linux
[forwarded from http://bugs.debian.org/195344]
This program:
class MyClass {
public static void main (String[] args) {
System.out.println ("Bla");
}
}
compiled with
gcj -g --main=MyClass -o MyClass MyClass.java
fails to show the source in gdb, showing this:
---------
GNU gdb 5.3-debian
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-linux"...
(gdb) list
1 /tmp/cctCgizH.i: No such file or directory.
in /tmp/cctCgizH.i
(gdb)
This only happens for main(); if you set a breakpoint on
'MyClass::main(JArray<java::lang::String*>*)' and run to that, then GDB
will display source. What you're seeing is actually a bug in gcj
however.
More information about the Gcc-bugs
mailing list