*BSD News Article 76937


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!cancer.vividnet.com!hunter.premier.net!news-res.gsl.net!news.gsl.net!news.mathworks.com!newsfeed.internetmci.com!newsxfer2.itd.umich.edu!news.itd.umich.edu!naughty.monkey.org!pha
From: pha@monkey.org (Paul H. Anderson)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: dbx
Date: 26 Aug 1996 16:14:04 GMT
Organization: University of Michigan
Lines: 25
Message-ID: <4vsigc$hks@lastactionhero.rs.itd.umich.edu>
References: <4vcevk$hul@solaris.cc.vt.edu>
NNTP-Posting-Host: naughty.monkey.org
X-Newsreader: TIN [version 1.2 PL2]

Hongjie Wang (hongjiew@vt.edu) wrote:
: Dear Friends:

: I for some reason can not find the program "dbx" in my FreeBSD system.
: Does such a program exist? If it does, where is it? If not, what 
: is the FreeBSD version of this program? 
: I understand there  is a program called "gdb", but, does it
: support Fortran? Where can I find a postscript version of
: tutorial on "gdb"? 
: Thanks a lot for your advice!

I've used gdb to debug programs generated by f77 on FreeBSD.  It is
somewhat awkward, but possible.  Basically, line number references work
more or less as you seem to expect, but global variables and common areas
are somewhat different.

To get started, I'd suggest using f2c (the middle stage between f77 and
gcc) to generate a sample .c file from your FORTRAN source, then you can
see how to reference names.  I forget offhand what they are like, but
common areas are stored in C structures, maybe with a leading underscore
character.

: Jay Wang

Paul Anderson