This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems while debugging fortran


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

I'm having some trouble while debugging this code:

c-------------------
c test.f
c ------------------
program this
	i=ifunc(1)
        print *,i
end

function ifunc(i)
        print *,i*2
        ifunc = 1
        return
end
c ------------------

If I try to set a breakpoint by line number, gdb displays:

	No line xx in file "init.c"

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").

What I believe is that the psymtab does not contain either function
symbols, since it's behaving differently when the psymtab is read and
when the corresponding symtab is read in. That's why GDB cannot find the
lines (worse, it's looking for them in the wrong file).

Is that line of thought correct? Any ideas where I should start looking
for the problem?

Thanks and regards,


- --
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG6wNbqvq7Aov/qQARAq0OAJ0X+xgtyA7+MnPIJostKRmpY3iylACffdNc
/3EYMQfX7tINpGHt03i/Cqg=
=bvvo
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]