john@mplvax.UUCP (John McInerney) (01/11/85)
With the 4.2 distribution of UNIX I, and my users, have found that the dbx debugger is just about useless for debugging f77 programs. One big problem is that while you are in a subroutine you couldn't examine any variables. There are many many other problems. My question is, how do you debug your f77 programs? Do you use a modified version of sdb? a fixed version of dbx? print statements? Any advise or pointers regarding the above would be appreciated. -- John McInerney sdcsvax!mplvax!john UUCP john@nosc ARPA
mather@uicsl.UUCP (01/14/85)
I don't seem to have any problems examining variables from within subroutines. Are you switching to that subroutine with the "func subr" command ?? I use dbx (remember to "f77 -g" for all subroutines and the link/loading step) all the time for both C and f77 without too much trouble. What I don't get is that when I power up dbx, I get a couple of error type messages about "MAIN" being wrong somehow. Is THIS standard or is it me?? b.c.mather software surgeon uiucdcs!uicsl!mather
daleh@tekcae.UUCP (Dale Henrichs) (01/15/85)
In article <168@mplvax.UUCP> john@mplvax.UUCP (John McInerney) writes: >My question is, >how do you debug your f77 programs? Do you use a modified version of >sdb? a fixed version of dbx? print statements? After limping along for several months using adb and print statements (I also found dbx to be entirely worthless for f77), I tried to make sdb work again. Not surprisingly, there is nothing wrong with sdb. The 4.2 f77 compiler doesn't put out the correct (from the point of view of sdb) symbol table information, so after a few relatively minor changes to the f77 compiler, sdb was working as it had under 4.1. Also, I made some changes to sdb so that it actually understands f77 (I added complex and double complex data types and more importantly made it possible for sdb to access common block variables, local variables and arrays). If you're interested in any of these enhancements, send me mail and I'll ship you the diffs. Dale Henrichs P.S.: The f77 compiler is being used on ~50K lines of code so the compiler is pretty well debugged. As far as sdb is concerned, it sure is nice to have an f77 debugger, even though it is a little buggy.
woods@hao.UUCP (Greg Woods) (01/16/85)
> In article <168@mplvax.UUCP> john@mplvax.UUCP (John McInerney) writes: > >My question is, > >how do you debug your f77 programs? Do you use a modified version of > >sdb? a fixed version of dbx? print statements? > > After limping along for several months using adb and print statements > (I also found dbx to be entirely worthless for f77), I tried to make > sdb work again. When I first read this, I decided not to clutter up the net by posting my response, so I mailed it instead. Now I've read the same thing again. I'd like to know why you think dbx is worthless for f77. Our version works fine. It is the vanilla-flavored version that came with 4.2 for our 750s. The only changes we've made that might have an effect on this are to install Donn Seeley's bug fixes to the f77 compiler, but I don't know if any of those fixes had anything to do with debugging (Donn?). What does dbx do or not do that makes you say it is "useless"? I find that all the commands I ever want to use (stop, trace (sloooow), print, file, func, edit, list) work fine. I and many others here routinely use dbx for debugging f77 programs. --Greg -- {ucbvax!hplabs | allegra!nbires | decvax!stcvax | harpo!seismo | ihnp4!stcvax} !hao!woods "...sometimes the light's all shining on me; other times I can barely see..."
woods@hao.UUCP (Greg Woods) (01/17/85)
> What I don't get is that when I power up dbx, I get a couple of error type > messages about "MAIN" being wrong somehow. Is THIS standard or is it me?? This will not occur if you do not use a PROGRAM card in your F77 program. This, I think, is because the "symbol" you define (the name you declare for the main program with the PROGRAM statement) is never referenced by anything, since it uses "MAIN_" instead. --Greg -- {ucbvax!hplabs | allegra!nbires | decvax!stcvax | harpo!seismo | ihnp4!stcvax} !hao!woods "...sometimes the light's all shining on me; other times I can barely see..."
daleh@tekcae.UUCP (Dale Henrichs) (01/20/85)
[I am just a poor f77 user trying to get work done on an operating system that doesn't seem to acknowledge the existence of any language besides C.] In article <1340@hao.UUCP> woods@hao.UUCP (Greg Woods) writes: >> >My question is, >> >how do you debug your f77 programs? Do you use a modified version of >> >sdb? a fixed version of dbx? print statements? >> >> After limping along for several months using adb and print statements >> (I also found dbx to be entirely worthless for f77), I tried to make >> sdb work again. > >I'd like to know why you think dbx is worthless for f77. Our version >works fine. I am not involved with source code maintenance for UNIX, but as far as I know, we are using the latest release of dbx from Berkely (I believe that the f77 complier is vanilla 4.2, without any fixes from the net). Nothing appears to work in our version of dbx...I have a 12 line test program and not one dbx command works (not to metion the 50k lines of f77 that our group tries to maintain without debugger support).... I have also received several requests for the sdb-related fixes, so we're not the only site on the net with an inoperative dbx. WHAT GIVES? < insert favorite long-winded flame >!!! If Donn Seeley's bug fixes do make dbx work with f77, then I would love to get a copy of the fixes (I would pass them along to the others that requested my sdb-related bug fixes as well). If Donn's fixes aren't the secret, does anyone have an idea what might be going on? Dale Henrichs