From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14921 invoked by alias); 5 Mar 2007 17:01:18 -0000 Received: (qmail 14909 invoked by uid 22791); 5 Mar 2007 17:01:17 -0000 X-Spam-Check-By: sourceware.org Received: from alnrmhc12.comcast.net (HELO alnrmhc12.comcast.net) (206.18.177.52) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 05 Mar 2007 17:01:06 +0000 Received: from hippogriff.homeunix.org ([75.71.67.96]) by comcast.net (alnrmhc12) with ESMTP id <20070305170104b1200nts07e>; Mon, 5 Mar 2007 17:01:05 +0000 Received: by hippogriff.homeunix.org (Postfix, from userid 1000) id 6488F578E2; Mon, 5 Mar 2007 10:01:10 -0700 (MST) Date: Mon, 05 Mar 2007 17:01:00 -0000 From: Patrick Alken To: gdb@sourceware.org Subject: Re: fortran arrays in gdb Message-ID: <20070305170109.GA21603@hippogriff.physics.drexel.edu> References: <20070303220033.GA17346@hippogriff.physics.drexel.edu> <20070305123309.GB14486@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070305123309.GB14486@caradoc.them.org> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00059.txt.bz2 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 >