From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30655 invoked by alias); 11 Sep 2002 13:52:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30640 invoked from network); 11 Sep 2002 13:52:49 -0000 Received: from unknown (HELO tetsuo.nj.caldera.com) (63.124.204.226) by sources.redhat.com with SMTP; 11 Sep 2002 13:52:49 -0000 Received: from caldera.com (localhost.localdomain [127.0.0.1]) by tetsuo.nj.caldera.com (8.11.6/8.11.6) with ESMTP id g8BE54S15883; Wed, 11 Sep 2002 10:05:04 -0400 Message-ID: <3D7F4D8F.2FB349C9@caldera.com> Date: Wed, 11 Sep 2002 06:52:00 -0000 From: Petr Sorfa Organization: Caldera X-Accept-Language: en MIME-Version: 1.0 To: Arjan van Dijk CC: gdb@sources.redhat.com Subject: Re: Who uses gdb + fortran? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00095.txt.bz2 Arjan van Dijk wrote: > > Hi, > > Last week I had problems running gdb on a fortran program. I'm still > looking for someone who uses the combination of gdb + fortran. > > Problem: how do I get the value of a variable? > Hi Arjan, I've written proper support for FORTRAN95 for GDB. We are currently integrating it into top of tree, but you can download the patch, src and RPMs for/as GDB 5.1.1 from: http://sourceforge.net/project/showfiles.php?group_id=56720 Once installed and debugging, to print a variable, just type "print i". Note that you may have to use DWARF debugging info in the exectutable to get everything working fine. This depends on which compiler you are using. Release Candidate should be out soon with fixes and documentation. Petr > "print MAIN__::i" > > should give the value of variable "i" in the main program. The result of > this command is just > > "A parse error in expression, near ':i'. > > Only when I use the "display" command instead of "print", and set the > display BEFORE I say "run" in gdb, then I get the values. > > HELP!!! > > Arjan > > Arjan van Dijk > Institute for Marine and Atmospheric Research Utrecht > Faculty of Physics and Astronomy > Utrecht University > Princetonplein 5 > NL - 3584 CC Utrecht > The Netherlands > > phone: +31 30 2532815 > fax: +31 30 2543163 > e-mail: mailto:A.vanDijk@phys.uu.nl > homepage: http://www.phys.uu.nl/~vndijk