HELP Sep. 15, 1984 F77/DEBUGGING Debugging Aids for F77 Programs The first step in debugging is to understand the error message you are getting. See "help f77 error_msgs" for advice on that. There are several utilities that can be used in debugging. If you have a core dump, use the debugger, dbx, to look at the core dump. If you compiled and loaded with the -g flag, dbx can be used to tell the line at which your program failed and to display the values of variables. Dbx can also be used to monitor a pro- gram while running and do interactive debugging. If you did not compile with the -g flag but did load using the -g flag, dbx will still tell you which subroutines were active at the time of the failure. If you did not load with the -g flag, dbx can not be used at all. See "help f77 dbx" and "man dbx" for more information. If you might be exceeding the bounds of an array, you can use f77's -C flag to check for subscripts out of range. The 'nm' utility is useful in telling which procedures are refer- enced in which .o files. Thus if the loader issues a message like: Undefined: _subr_ and you don't know where subr() is called, the command: nm -og *.o | grep subr will tell you which '.o' files in this directory reference subr(). The -M flag can be used to tell out of which archive or library a .o file is loaded.