Problems while debugging fortran

Joel Brobecker brobecker@adacore.com
Thu Sep 20 19:47:00 GMT 2007


Carlos,

> If I try to set a breakpoint by line number, gdb displays:
> 
> 	No line xx in file "init.c"

What command exactly did you use to set your breakpoint?
Did you try:

        (gdb) break test.f:3

?

> However, it works if I set the breakpoint by function name (e.g. "break
> this"). If I run the program, then clear all breakpoints and try to set
> a breakpoint by line number, it'll work IF the line is within the scope
> of that function (i.e. if I set "break this", I can't set a breakpoint
> by line in the line "print *,i*2").

Perhaps it would be clearer if you could post annotated copies of
your various GDB sessions (the ones that work, and the ones that
don't). I think it'll be easier for us to help you.

Are you using a recent snapshot from CVS?

-- 
Joel



More information about the Gdb mailing list