This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: fortran arrays in gdb
On Mon, Mar 05, 2007 at 10:01:10AM -0700, Patrick Alken wrote:
> Hi,
>
> I have tried the latest snapshot: GNU gdb 6.6.50.20070305
> but it has the same behavior has 6.5:
>
> (gdb) p a
> $5 = (PTR TO -> ( real*8 (1,1))) 0xbf85dbd0
>
> Since the matrix "a" has a dynamically specified size:
>
> double precision a(n,n) where n is an input parameter, maybe
> gdb cannot determine how big it is, since the "print a" command
> is telling me its a 1-by-1 matrix. Is there a way to "tell" gdb
> what the leading dimension of the array is, so that a(x,y) will
> work correctly?
No, but it's supposed to be able to figure this out automatically. I
guess there must be a bug somewhere :-(
--
Daniel Jacobowitz
CodeSourcery