DEBUG STEP — MicroVMS 4.5B
STEP causes your program to execute one instruction or one line,
or one of some other kind of "unit" depending on qualifier. When
you step, the address that you step to is reported. If you are
stepping by instruction, then you will see the machine
instruction at the address that you have stepped to. If you have
done SET STEP SOURCE and source display is available for your
language then you will also see the source line corresponding to
the location you have stepped to.
Format:
STEP [/qualifier] [n]
Additional information available:
/BRANCH/CALL/EXCEPTION/INSTRUCTION/INSTRUCTION
/INTO/JSB/LINE/NOJSB/NOSILENT/NOSHARE/NOSOURCE
/NOSYSTEM/OVER/RETURN/SHARE/SILENT/SOURCE
/SYSTEM
Parameters
n
Specifies the number of steps to perform before stopping. If you
do not specify a parameter, then "n" defaults to 1.
Qualifiers
The qualifiers can be grouped as follows:
These tell the debugger how far to step:
/BRANCH /CALL /EXCEPTION /LINE /RETURN
/INSTRUCTION /INSTRUCTION=(opcode-list)
These control how much information to display at each step:
/[NO]SILENT /[NO]SOURCE
These determine what the debugger does at a routine call:
/INTO /OVER /[NO]SYSTEM /[NO]SHARE /[NO]JSB
Note that each of the above can also be used in a SET STEP
command. See the individual help topic on each of these for more
information.
/BRANCH
Causes the step command to step to the next branch instruction.
This has the same effect as "SET BREAK/BRANCH;GO".
/CALL
Causes the step command to step to the next call or return
instruction. This has the same effect as "SET BREAK/CALL;GO".
/EXCEPTION
Causes the step command to step to the next exception (i.e.,
error signal). This has the same effect as "SET
BREAK/EXCEPTION;GO".
/INSTRUCTION
Causes the step command to step a single machine instruction.
/INSTRUCTION=(opcode-list)
This allows you to step to the next instruction which is in the
given opcode list. For example, STEP/INST=(ADDL3) will step to
the next "ADDL3" instruction in your program.
/INTO
If you are at a CALL statement, then STEP/INTO allows you to step
into the called subroutine. The /INTO qualifier may be further
refined by /NOSHARE, /NOSYSTEM, or /NOJSB. See those help topics
for details.
/JSB
/JSB, which is the default, simply says that on a STEP/INTO, the
debugger should not distinguish between JSB routines and CALL
routines. /NOJSB is mainly used for language DIBOL (see the
/NOJSB help topic for further explanation).
/LINE
Causes the step command to step to the next line of your program.
/NOJSB
NOJSB is a refinement of INTO. "SET STEP INTO,NOJSB" specifies
that you want to step into called subroutines if they are called
with the CALL instruction but not if they are called with the JSB
instruction. /NOJSB was mainly put in for language DIBOL, where
the DIBOL run-time library is always called with JSB instructions
but your DIBOL subroutines are always called with CALL
instructions. Therefore, for DIBOL, /NOJSB is the default, so
that you do not step into the DIBOL run-time library on a
STEP/INTO. For all other languages, /JSB is the default meaning
that no distinction is made between JSB and CALL instructions on
a STEP command.
/NOSILENT
Opposite of /SILENT. /NOSILENT, which is the default, simply
specifies that you do want to see the "stepped to" message and
other STEP output.
/NOSHARE
NOSHARE is a refinement of INTO. "SET STEP INTO,NOSHARE"
specifies that you want to step into called subroutines if they
are part of your main image, but not if they are part of a
shareable image (e.g., an RTL routine). For example, to trace
all lines of execution in your program, but not including RTL
routines, you could specify "SET TRACE/LINE/NOSHARE".
/NOSOURCE
Specifies that you do not want to see source display during this
step command. You may want to say "SET STEP NOSOURCE" if you are
in screen mode because with the screen mode source display,
source display on each STEP command would be redundant.
/NOSYSTEM
NOSYSTEM is a refinement of INTO. "SET STEP INTO,NOSYSTEM"
specifies that you want to step into called subroutines if they
are part of your main image, but not step into a system service.
For example, to trace all lines of execution in your program, but
not including system services or RTL routines, you could specify
"SET TRACE/LINE/NOSYSTEM/NOSHARE". (DEBUG actually just
identifies a system service by its address being in P1 space. So
"SET STEP NOSYSTEM" prevents you from stepping into any routine
whose address is in P1 space.)
/OVER
If you are at a CALL statement, then STEP/OVER allows you to step
over the called subroutine. /OVER is the opposite of /INTO.
/RETURN
Causes the step command to step to the return instruction of the
routine that you are now in.
/SHARE
Opposite of /NOSHARE. /SHARE, which is the default, simply says
that DEBUG should feel free to step into called subroutines that
are in shareable images (e.g., RTL routines).
/SILENT
Causes the step command to be "silent", i.e., neither the
"stepped to" message nor the source display are given.
/SOURCE
Causes the step command to display the source code corresponding
to the current program location. This is the default.
/SYSTEM
Opposite of /NOSYSTEM. /SYSTEM, which is the default, simply
says that DEBUG should feel free to step into called system
services. (DEBUG actually just identifies a system service by
its address being in P1 space. So "SET STEP NOSYSTEM" prevents
you from stepping into any routine whose address is in P1 space.)
Example
DBG> SHOW STEP
step type: source, nosilent, by line,
over routine calls
DBG> STEP ! step one source line
stepped to EIGHTQUEENS\TRYCOL\%LINE 44
44: i := 0 ;
DBG> STEP 3 ! step three source lines
stepped to EIGHTQUEENS\TRYCOL\%LINE 48
48: if safe then
DBG> SET STEP INST
DBG> STEP ! step one instruction
stepped to EIGHTQUEENS\TRYCOL\%LINE 50: MOVL FP,R1
50: setqueen ;
DBG> STEP/RETURN ! step to the end of the routine
stepped on return from EIGHTQUEENS\TRYCOL to
EIGHTQUEENS\TRYCOL\%LINE 59: RET
59: end ; (* trycol *)