-
ABBREVIATION
-
ru{nto}
-
FORMAT
-
runto
HOOK-TYPE
[when(EXPRESSION)] [count N]
-
DESCRIPTION
-
The
runto
command places a temporary, or one-shot, breakpoint at the location specified
by the HOOK-TYPE argument. (See HOOK-TYPE Argument.)
A when clause is used to request
runto
breakpoints conditionally; that is, a breakpoint is requested
at the specified hook only if the when clause is true when the hook is reached.
The argument count N is optional. If count N is specified,
the first N - 1 times the hook is reached, the count is decremented.
The Nth time it is hit, the debugger breaks.
If a when clause is present, a hit is counted only if
the when expression is true.
A breakpoint set with a runto
command remains installed only until execution is stopped and the debugger
returns control to you. In other words, it is temporary and only good for
one attempt. The breakpoint is removed the first time the debugger stops,
whether it stops for the breakpoint set with the runto
command or for some other reason.
The result of issuing a runto
command is that in most cases the program executes until the temporary breakpoint
is hit; however, if some other event occurs that gives you control before
the breakpoint is hit, the debugger gives you control and the debugger removes
the breakpoint.
Examples of other events that may stop program execution
before the runto
breakpoint is hit are
If you receive control because of a runto
breakpoint being hit, the Status window
displays Runto
as the reason for entry into the debugger.
-
EXAMPLES
-
-
runto main 52
-
sets a temporary breakpoint at line 52 of
the
main
function and resumes execution.
-
runto func1 return
-
sets a temporary breakpoint on the return
from function
func1
and resumes execution.
-
runto stats 15 when(i==10)
-
sets a temporary breakpoint at line 15 of
the
stats
function when the value of
i
is 10 and resumes execution.
-
runto 75
-
sets a temporary breakpoint at line 75 of
the current function and resumes execution.
-
runto 75 count 5
-
sets a temporary breakpoint at line 75 of
the current function the fifth time the line-number hook at that line is reached
and resumes execution.
-
ADDITIONAL DISCUSSION AND EXAMPLES
-
See Chapter 11, Setting Temporary Breakpoints
-
SYSTEM
DEPENDENCIES
-
none
-
COMMAND CAN BE ISSUED FROM
-
-
SCOPE
-
The
runto
command uses command scope to supply default identifiers, function names,
and section names.
-
RETURN CODES SET
-
-
SEE
ALSO
-