fortran arrays in gdb

Patrick Alken patrick.alken@colorado.edu
Mon Mar 5 17:01:00 GMT 2007


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?

Patrick Alken

On Mon, Mar 05, 2007 at 07:33:09AM -0500, Daniel Jacobowitz wrote:
> On Sat, Mar 03, 2007 at 03:00:33PM -0700, Patrick Alken wrote:
> > Hello,
> > 
> >   I am trying to call fortran subroutines from C and then step
> > through the fortran code with gdb. Unfortunately, gdb (version 6.5)
> > cannot properly display the contents of 2D arrays passed to the fortran
> > routine. I have created 2 simple files:
> 
> Could you try 6.6, or better yet, a current CVS snapshot?  Some work
> was done on Fortran array support.
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery
> 



More information about the Gdb mailing list