[comp.lang.fortran] GDB and Fortran

m1tag00@fed.FRB.GOV (Tim A. Grunwald) (10/26/88)

	GDB works very well with compiled C code.  My problem is that
when I try to debug a large Fortran program with GDB it seems to work
fine until I try to print out variable values.  All variables print
out the same value, -1.  Is GDB supposed to be able to debug Fortran
programs?  If so, what am I doing wrong?  Any help on this problem
would be appreciated.

	Tim Grunwald
	Federal Reserve Board
	21st & C st N.W. DC  20551
	uunet!fed!m1tag00

csmith@mozart.uucp (Chris Smith) (10/26/88)

I've modified GDB so it's able to deal with C-like Fortran -- 
REAL A(10) turns into float a[10], with subscripts 0..9, and like that.
I'll be glad to mail the diffs if you want to patch them in.  They
teach GDB how to deal with reference arguments and common blocks.  
If the variables that type as -1 are not arguments or in common, 
then what I've got won't help.

csmith@convex.COM