Date: Thu, 7 Aug 2003 14:02:51 -0400
From: Aleksandar Donev <[log in to unmask]>
All compilers I use supply their own debugger (which may be on top
of gdb).
Interesting.
Part of the problem is that there are Fortran 90 concepts which
have no implementation standard. For example, the array descriptor
is compiler-specific. So if you want to debug and look into an
array pointer to see the address field or the size field or
whatever, there cannot be a universal way to do this.
Good point [the internal representation needs to interact with a
vendor's layout], and I forgot to enumerate that one, but it isn't
really a big problem, and already exists in other places. For
example, on some platforms (Alpha) a C pointer-to-function points
directly at the entry instruction of the function, but on other
platforms (Itanium) a C pointer-to-function points to a two-entry
block that is a <instruction_pointer,global_pointer> pair. In C++,
the structure of a class (with virtual functions, virtual base
classes, etc) is already something gdb needs to cope with. An F90
array descriptor can be sufficiently abstracted. It needs a reference
address for the data, a number of dimensions, and for each dimension a
lower bound, an upper bound, and an "inter-element-spacing"
multiplier. If vendors supply more stuff, it could be hung off a
property list. Indeed, doing a pointer assign might need this extra
information, and that's where some compiler-specific code would creep
in. But again, properly modularized into a concept it would live in
the compiler-specific support section.
I am not a vendor and am not sure if vendors would at all be
willing to release that kind of info into the public domain...
Digital/Compaq happens to document it (in the User's Guide?), I think
for C interoperability. If I were a vendor, I'd hesitate because it
is generally ugly, not because there are intellectual secrets. The
"freedom to change internal layouts" argument is pretty weak here;
things work well enough now and a change would annoy users by
requiring them to recompile EVERYTHING.
|