This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Q: How do I use gdb with egcs fortran
- To: egcs at cygnus dot com
- Subject: Re: Q: How do I use gdb with egcs fortran
- From: Tim Schmielau <tim at physik3 dot uni-rostock dot de>
- Date: Fri, 20 Mar 1998 15:33:49 +0100 (MET)
> Programs are compiled with -g (I also tried -ggdb3) but
> still I get message "No default source file yet".
Try setting a breakpoint at MAIN__ and issuing a "run" command.
After that the debugger will (hopefully) find the source file.
The reason is that the debugger begins program execution at the
startup code, not at the first line of your FORTRAN program:
> gdb hello
GDB is free software and you are welcome to 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.
GDB 4.16 (i486-unknown-linux --target i486-linux),
Copyright 1996 Free Software Foundation, Inc...
(gdb) b MAIN__
Breakpoint 1 at 0x8048d9f: file hello.f, line 1.
(gdb) r
Starting program: /tmp/tim/hello
Breakpoint 1, MAIN__ () at hello.f:1
1 WRITE(*,*) "Hello, world!"
Current language: auto; currently fortran
(gdb) l
1 WRITE(*,*) "Hello, world!"
2 END
(gdb)