[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

g77 and gdb.



Hello,

I am sure I am doing something silly, but I can´t find out what.

I can not manage to debug fotran code compiled with g77. I am using GNU
Fortran 0.5.24-19980804 (instaled from slink and part of the new egcs
1.1). Here is an exemple of what I am doing:

I try to compile the "hello world" program bellow:


hello.f:
      program hello
      print *, "Hello World!"
      end


It works well. Then I use "g77 -g hello.f -o hello" to compile it with
debbuging information. After that I start gdb with "gdb hello". Gdb
complains it can´t find a file called:
              ../../../../libf2c/libF77/main.c
Here is sample of a gdb session:


bash-2.01$ gdb hello
GNU gdb 4.17
Copyright 1998 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 "i586-pc-linux-gnu"...
(gdb) list
../../../../libf2c/libF77/main.c:46: No such file or directory.
(gdb) break main
Breakpoint 1 at 0x804ae89: file ../../../../libf2c/libF77/main.c, line
55.
(gdb) run
Starting program: /home/paulojs/programas/estudos_f90/hello 

Breakpoint 1, main (argc=1, argv=0xbffffd58)
    at ../../../../libf2c/libF77/main.c:55
../../../../libf2c/libF77/main.c:55: No such file or directory.
(gdb) list
../../../../libf2c/libF77/main.c:50: No such file or directory.
(gdb) continue
Continuing.
 Hello World!

Program exited normally.
(gdb) quit
bash-2.01$


What am I doing wrong?

Paulo.


Reply to: