Next / Previous / Index / TCC Help System / Publications / Site map / NM Tech homepage

Compiling your Fortran program for debugging

Tech Computer Center logo

In order to use a debugger like gdb to track the execution of your Fortran program, it is necessary to compile the program with the ``-g'' option. For example, suppose your source file is called foo.f. To compile it, you'd type:

    f77 -g foo.f -o foo
The ``-g'' option is necessary for the correct option of the debugger.

The command above will create an executable file named ``foo''. You can run this executable normally, but you can also run it under the control of the gdb debugger to find out what it is actually doing. See `Starting your Fortran program with gdb'.


Next: Starting your Fortran program with gdb
See also: Debugging Fortran programs with gdb
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Computer Center: Help System
TCC Publications
Home: About New Mexico Tech

John Shipman, john@nmt.edu

Last updated: 1995/12/19 18:58:09 UT
URL: http://www.nmt.edu/tcc/help/lang/fortran/gdbcompile.html