To call a macro from within an expression
• Enter a macro call as part of any expression entered on the command line of
The debugger will evaluate the macro and use its return value when evaluating
the rest of the expression.
If you have the following macro definition:
Debugger Macro Add int power(x,y)
Expression Display_Value 33.3 + power(2,3)
will call and evaluate the macro, displaying the value 41.3 in the debugger's
To call a macro from within a macro
• You can call a macro from within a macro when they are part of an expression.
The following restrictions apply to calling macros from within a macro:
/* Multiply x by itself y -1 times */
for (i = 1, multiplier = x; i < y;i++)
x *= multiplier;
/* Return x ^y */
The macro called must have been previously defined.
Chapter 6: Using Macros and Command Files
/* Loop counter */
/* Value x is multiplied by */