[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [photran] Re: Where to focus development efforts
|
Hi Adrian,
the multi dimensional arrays problem in the debugger
...
If you can give me a feel for what the problem is with
> this mutli dimensional arrays problem then I might be able to help
If you're interested in working on this problem, that's great. Photran
actually uses the CDT (C/C++) debugger as-is -- no changes whatsoever.
The CDT debugger is just a graphical interface for gdb; it communicates
with gdb using MI. What the debugger displays (for multi-dimensional
arrays or otherwise) directly corresponds to what information it can get
from gdb about the array. In turn, gdb gets this information from
debugging symbols that the compiler embeds in the executable (binary).
I am not a Fortran programmer, so I don't have a good sense of how well
gdb actually supports various Fortran compilers' binaries. I do know
that it's primarily intended to be a C/C++ debugger. If I compile code
with a statically-allocated 2x3 integer array in gfortran, it seems the
gfortran restructures this as a one-dimensional, six-element array...
and I can't find anything accessible in gdb that tells me it's actually
2x3. But I could be missing something.
There are basically two (feasible) ways to fix this problem. If the
array dimension information *is* available to gdb but it's being
ignored, then you could try to fix the CDT debugger. If gdb just
doesn't support Fortran multidimensional arrays, then you could add
support for a different debugger. (What debugger(s) do Fortran
programmers use, anyway?)
In either case, I could point you toward some people with CDT/debugger
experience.
Jeff