Go to main content
Oracle® Developer Studio 12.5: Debugging a Program with dbx

Exit Print View

Updated: June 2016
 
 

Running Your Program in dbx

To run your most recently loaded program in dbx, use the run command. If you type the run command initially without arguments, the program is run without arguments. To pass arguments or redirect the input or output of your program, use the following syntax:

run [ arguments ] [ < inputfile ] [ > output-file ]

For example:

(dbx) run -h -p < input > output
Running: a.out
(process id 1234)
execution completed, exit code is 0
(dbx)

When you run an application that includes Java code, the run arguments are passed to the Java application, not to the JVM software. Do not include the main class name as an argument.

If you repeat the run command without arguments, the program restarts using the arguments or redirection from the previous run command. You can reset the options using the rerun command. For more information about the run command, see run Command. For more information about the rerun command, see rerun Command.

Your application might run to completion and terminate normally. If you have set breakpoints, it will probably stop at a breakpoint. If your application contains bugs, it might stop because of a memory fault or segmentation fault.