System Debug Reference Manual (32650-90888)

226 Chapter6
System Debug Command Specifications M-X
MACTRACE
1 All tracing is disabled. (Default)
2 Macro entry is displayed.
3 Macro entry and exit are displayed.
4 Macro entry, input parameter values, macro exit, and
functional return values are displayed.
Examples
$nmdat > macl @ all
macro driver
machelp = 'This macro calls macros "triple", "min", and "inc" in
order' +
'to demonstrate the MACECHO, MACREF, and MACTRACE commands'
{ loc one 1;
loc two 2;
wl min ( triple(two) inc(one) )
}
macro inc
( num : ANY )
machelp = 'returns the increment of "num"'
{ loc temp num;
loc temp temp + 1;
return temp
}
macro min
( parm1 : ANY ,
parm2 : ANY )
machelp = 'returns the min of "parm1" or "parm2"'
{ if parm1 < parm2
then return parm1
else return parm2
}
macro triple
( input : ANY )
machelp = 'triples the parameter "input"'
{ return input *3
}
Assume that the macros listed above have been defined. A few of the macros use local
variables inefficiently, for the purpose of demonstration.
$nmdat > driver
$2
Macros normally execute silently, as they invoke commands, and often other macros. In
this example, macro driver is invoked, and this macro calls several other macros. Since
macro tracing is not enabled for any of these macros, execution proceeds silently.
$nmdat > mactrace inc 3
$nmdat > driver
--> enter macro: inc
--> parms macro: inc