.TI F77/DEBUGGING "Sep. 4, 1985"
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 set break points or single step a
program and do interactive debugging.

If you did not compile with the -g flag,
dbx will still tell you which subroutines were active at the time
of the failure.  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 referenced
in which '.o' files.  Thus if the loader issues a message like:

.nf
	Undefined:
	_subr_
.fi

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.
