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

Starting your Fortran program with gdb

Tech Computer Center logo

Once you have compiled your Fortran program with the ``-g'' option (see `Compiling your Fortran program for debugging'), you can control and monitor its execution in detail by using the gdb debugger program.

To start execution of a program named foo under gdb:

  1. Type gdb followed by the name of your program, for example:
            gdb foo
    You will get a command prompt that looks like this: (gdb)
  2. Type these commands at the (gdb) prompt:
            break main
            run
    This will start execution of your program, but execution will pause just before the first executable statement.

Next: Stepping through your Fortran program with gdb
See also: Debugging Fortran programs with gdb
Previous: Compiling your Fortran program for debugging
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/gdbstart.html