Debugging a Program With dbx

Running a Program

When you first load a program into dbx, dbx visits the program's "main" block (main for C, C++, and Fortran 90, MAIN for FORTRAN 77). dbx waits for you to issue further commands; you can visit code or use event management commands.

You may choose to set breakpoints in the program before running it. When ready, use the run command to start program execution.

To run a program in dbx without arguments, type:


(dbx) run

You can optionally add command-line arguments and redirection of input and output


(dbx) run [arguments
][ < input_file
] [ > output_file
]

:

Output from the run command overwrites an existing file even if you have set noclobber for the shell in which you are running dbx.

The run command by itself restarts the program using the previous arguments and redirection. The rerun command restarts the program and clears the original arguments and redirection.