Predefined macro
This macro causes execution to break when the specified expression evaluates to TRUE. It is designed to be used with any breakpoint commands. When used with a breakpoint command, program execution halts when the specified expression is TRUE and continues when the specified expression is FALSE.
Syntax:
int
when (expression)
int expression;
where:
expression An expression that is evaluated to test whether the result is nonzero.
Return Value
int One of the following:
0 Indicates that expression is TRUE (nonzero).
1 Indicates that expression is FALSE (zero).
Rules
Any C expression resulting in a value can be used as the argument, expression.
Example
Set a breakpoint at the entry point of the routine strcpy. Each time strcpy is encountered, a breakpoint occurs, and the macro when is executed. The macro causes program execution to stop when its argument, in this case the byte pointed to by str, is zero.
BREAKINSTRUCTION strcpy;when(*str == 0)