PDA

View Full Version : Debugging a Fortran Program



CaKiwi
February 6th, 2010, 06:42 PM
I have compiled a Fortran program by using

gfortran -ggdb file.f90

To try to step through it in the debugger, I enter

gdb a.out

but I cannot create a break point. I have tried a number of commands including

b <line number>
b <subroutine name>

What am I missing here?

croto
February 6th, 2010, 08:18 PM
try indicating the file name. If for instance you want a breakpoint in line 10:


break file.f90:10

CaKiwi
February 6th, 2010, 10:13 PM
Thanks for the response, Croto. For some reason


break <line number>

is working now.