This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Problems while debugging fortran
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 20 Sep 2007 10:32:46 -0700
- Subject: Re: Problems while debugging fortran
- References: <46EB035B.4090802@linux.vnet.ibm.com>
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