Runs a program under debugger control.
NOTE
Requires that you started your debugging session with the
DCL command DEBUG/KEEP. If you began your session with
the DCL command RUN filespec instead, you cannot use the
debugger RUN command.
Format
RUN [program-image]
1 – Parameters
program-image
Specifies the executable image of the program to be debugged.
Do not specify an image if you use the /COMMAND=cmd-symbol
qualifier.
2 – Qualifiers
2.1 /ARGUMENTS
/ARGUMENTS="arg-list"
Specifies a list of arguments. If you specify a quoted string,
you might have to add quotation marks because the debugger strips
quotes when parsing the string.
2.2 /COMMAND
/COMMAND="cmd-symbol"
Specifies a DCL foreign command for running the program.
Do not use this qualifier if you specify a program-image
parameter.
Do not specify a DCL command or any other command definition that
was created with the SET COMMAND command.
2.3 /HEAP_ANALYZER
(Applies only to workstation users.) Invokes the Heap Analyzer, a
debugger feature that helps you understand how memory is used
by your application. For more information on using the Heap
Analyzer, see the OpenVMS Debugger Manual.
2.4 /NEW
Runs a new program under debugger control without terminating any
programs already running.
3 – Description
If you invoked the debugger with the DCL command DEBUG/KEEP, you
can use the debugger RUN command at any time during a debugging
session to start a program under debugger control. If you are in
the midst of debugging a program when you issue the RUN command,
that program will first be terminated unless you use the /NEW
qualifier.
To run the same program again (that is, the same version of the
program that is currently under debugger control), use the RERUN
command. RERUN enables you to save the current state (activated
or deactivated) of any breakpoints, tracepoints, and static
watchpoints.
Note the following restrictions about the debugger RUN command:
o You can use the RUN command only if you started the debugger
with the DCL command DEBUG/KEEP.
o You cannot use the RUN command to connect the debugger to a
running program. See the description of Ctrl/Y.
o You cannot run a program under debugger control over a DECnet
link. Both the image to be debugged and the debugger must
reside on the same node.
Related commands:
RERUN
RUN (DCL command)
Ctrl/Y-DEBUG (DCL command)
DEBUG (DCL command)
4 – Examples
1.DBG> RUN EIGHTQUEENS
Language: C, Module: EIGHTQUEENS
This command brings the program EIGHTQUEENS under debugger
control.
2.$ RUNPROG == "$ DISK3:[SMITH]MYPROG.EXE"
$ DEBUG/KEEP
. . .
DBG> RUN/COMMAND="RUNPROG"/ARGUMENTS="X Y Z"
The first line of this example creates a command symbol RUNPROG
(at DCL level) to run an image named MYPROG.EXE. The second
line starts the debugger. The debugger RUN command then brings
the image MYPROG.EXE under debugger control. The /COMMAND
qualifier specifies the command symbol previously created (in
this case RUNPROG), and the /ARGUMENTS qualifier passes the
arguments X Y Z to the image.
3.DBG> RUN/ARGUMENTS="X Y Z" MYPROG
This command brings the program MYPROG.EXE under debugger
control and passes the arguments X Y Z.