This is the mail archive of the gdb@sources.redhat.com 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]

Re: problem setting displays


>That (in a sense) is good news.  It eliminates display from the problem.
>
>I suspect it is a problem in either the fortran (that was fortran right
>:-) parser or the code that handes fortran variable scopes.   The other
>possability is that GDB loaded in additional debug information (gdb does
>this when it first hits a breakpoint for an object file) and that made
>the expression invalid.


Hi,

Indeed it was fortran. Just plain g77, applied to a very simple example
program,  already makes the trouble. This makes me wonder why on earth the
two products, gdb and g77, both have a reference to GNU in their name, but
cannot collaborate. I find this very annoying. In a reaction to my second
attempt to get a reaction on this problem, Petr Sorfa <petrs@caldera.com>
gave me a reference to his project,
http://sourceforge.net/project/showfiles.php?group_id=56720
where he develops a gdb version which can handle Fortran (as long as the
compiler gives the right kind of debug info). In his gdb version (RC1), the
"print" command does not want to make a reference to a specific subroutine,
e.g. the command:

print subroutinename::variablename

does not (yet) work. Only "print variablename" works. This makes it
difficult to follow two variables both named "i" that are both involved in
a calculation, but which belong to different subroutines in the same
source-file (e.g. one calling the other). Also unfortunate is that this gdb
version does not compile on our Dec Alpha, but Petr already gave a
suggestion on how to try to solve this problem. On Linux it is a relief to
see this version simply eat the Fortran. I would be glad to see this
project be embraced by the maintainers of the official gdb distribution. So
far debugging Fortran is virtually impossible. I also wonder how the
Fortran community debugs its code. I fear that they all fall back on huge
amounts of write-statements and that they still live in the stone ages. Are
debuggers tools for quiche-eaters?

Regards,

Arjan


Arjan van Dijk
Institute for Marine and Atmospheric Research Utrecht
Faculty of Physics and Astronomy
Utrecht University
Princetonplein 5
NL - 3584 CC  Utrecht
The Netherlands

phone: +31 30 2532815
fax:   +31 30 2543163
e-mail: mailto:A.vanDijk@phys.uu.nl
homepage: http://www.phys.uu.nl/~vndijk



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