public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: Problems while debugging fortran
@ 2007-10-25 16:07 François-Xavier Coudert
  2007-10-25 17:06 ` Daniel Jacobowitz
  0 siblings, 1 reply; 29+ messages in thread
From: François-Xavier Coudert @ 2007-10-25 16:07 UTC (permalink / raw)
  To: gdb; +Cc: Daniel Jacobowitz, Joel Brobecker, Carlos Eduardo Seo

Hi,

> This is very unclear, since they don't explain what "support"
> refers to. But for people stuck with XLF, if we can improve their
> lives without hurting the rest of GDB, I'm ok with compromising and
> using this attribute value be used to find the main.

I'd like to support this comprise, and I'll note that other compilers
(Intel and Sun, at least) already use this convention.

For the longer term, what do you think is the optimal solution? I'd
like to make gfortran, the Fortran front-end in GCC, do The Right
Thing, but what is it? Should we add this DW_AT_calling_convention tag
for the time being, until the meaning of the DWARF standard is made
clearer?

FX

PS: I might submit patches to GDB in the future. Could someone send me
copyright assignment form? (I already have a GCC assignment, if that
makes any difference)

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Problems while debugging fortran
@ 2007-09-15 11:37 Carlos Eduardo Seo
  2007-09-20 19:47 ` Joel Brobecker
  0 siblings, 1 reply; 29+ messages in thread
From: Carlos Eduardo Seo @ 2007-09-15 11:37 UTC (permalink / raw)
  To: gdb

-----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-----

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2007-11-13 17:45 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-25 16:07 Problems while debugging fortran François-Xavier Coudert
2007-10-25 17:06 ` Daniel Jacobowitz
2007-10-25 18:44   ` Jim Blandy
2007-10-25 19:01     ` Daniel Jacobowitz
2007-10-25 19:27       ` Jim Blandy
2007-10-25 20:24         ` Joel Brobecker
2007-10-25 20:36           ` Carlos Eduardo Seo
2007-10-25 20:41             ` Joel Brobecker
     [not found]               ` <4721034D.2060502@linux.vnet.ibm.com>
2007-11-13 17:45                 ` Problems while debugging fortran -- DWARF Michael Eager
2007-10-25 20:55             ` Problems while debugging fortran Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2007-09-15 11:37 Carlos Eduardo Seo
2007-09-20 19:47 ` Joel Brobecker
2007-09-20 20:46   ` Carlos Eduardo Seo
2007-09-20 20:56     ` Joel Brobecker
2007-09-21  6:52       ` Daniel Jacobowitz
2007-09-26 21:46         ` Carlos Eduardo Seo
2007-09-26 21:51           ` Pierre Muller
2007-09-26 21:51           ` Joel Brobecker
2007-10-24 16:20             ` Carlos Eduardo Seo
2007-10-24 19:33               ` Joel Brobecker
2007-10-24 19:57                 ` Daniel Jacobowitz
2007-10-24 20:16                   ` Carlos Eduardo Seo
2007-10-24 21:56                     ` Carlos Eduardo Seo
2007-09-23  2:52       ` Carlos Eduardo Seo
2007-09-24 10:01         ` Joel Brobecker
2007-09-24 23:49           ` Carlos Eduardo Seo
2007-09-25  1:29             ` Joel Brobecker
2007-09-25 17:34               ` Carlos Eduardo Seo
2007-09-26  6:29                 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).