This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcj/gdb problem -- can't find source file
- From: Scott Hazelhurst <scott at cs dot wits dot ac dot za>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 13 May 2003 15:38:11 +0200
- Subject: gcj/gdb problem -- can't find source file
- Organisation: Computer Science, University of the Witwatersrand
- References: <1052831279.807.ezmlm@gcc.gnu.org>
- Reply-to: scott at cs dot wits dot ac dot za
I am trying to use gdb with gcj. I have read the faq and the help file
available (http://gcc.gnu.org/java/gdb.html) and tried to search the
mailing list but haven't succeeded.
gdb appears not to find the source file so that the user can't follow
in the source file where execution is happening or examine local
variables.
The session below illustrates the problem (I also tried compiling the
Java source with gcj directly).
I am using the following versions
gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
GNU gdb Red Hat Linux (5.2.1-4)
(and used slightly older versions on a RH7 machine to get the same)
Any help gratefully appreciated,
Thanks
Scott
[ug]$ javac -g Lab2a1.java
[ug]$ gcj -g -o Lab2a1 --main=Lab2a1 Lab2a1.class
[ug]$ gdb Lab2a1
GNU gdb Red Hat Linux (5.2.1-4)
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-redhat-linux"...
(gdb) break main
Breakpoint 1 at 0x8048b04: file /tmp/ccO9DjzS.i, line 10.
(gdb) run
Starting program: /home/students/coms200f/labs/lab2/Lab2a1
[New Thread 8192 (LWP 28072)]
[Switching to Thread 8192 (LWP 28072)]
Breakpoint 1, main (argc=1, argv=0xbffffc34) at /tmp/ccO9DjzS.i:10
10 /tmp/ccO9DjzS.i: No such file or directory.
in /tmp/ccO9DjzS.i
(gdb) print a
No symbol "a" in current context.
(gdb) next