System Debug Reference Manual (32650-90888)
224 Chapter6
System Debug Command Specifications M-X
MACREF
Assume that the macros listed above have been defined. A few of the macros use local
variables inefficiently, for the purpose of demonstration.
$nmdat > macl @ ref
macro driver ref = #0
macro inc ref = #0
macro min ref = #0
macro triple ref = #0
The MACLIST command is used to display the current reference counts for all macros. At
this point, the reference counts for all macros are zero.
$nmdat > wl inc(4)
$5
$nmdat > wl min(inc(3) inc(0))
$1
$nmdat > macl @ ref
macro driver ref = #0
macro inc ref = #3
macro min ref = #1
macro triple ref = #0
A few macros are invoked, then the MACLIST command is used again to display the current
reference counts. Macro inc has been called three times, and macro min has been called
one time.
$nmdat > macref inc
$nmdat > macl @ ref
macro driver ref = #0
macro inc ref = #0
macro min ref = #1
macro triple ref = #0
The MACREF command is used to reset the reference count for macro inc. The MACLIST
command is used to verify that the count has been successfully reset.
$nmdat > driver
$2
$nmdat > macl @ ref
macro driver ref = #1
macro inc ref = #1
macro min ref = #2
macro triple ref = #1
Macro driver is invoked, then the reference counts are checked again.
$nmdat > macref @
$nmdat > macl @ ref
macro driver ref = #0
macro inc ref = #0
macro min ref = #0
macro triple ref = #0
The reference counts for
all
macros are reset to zero.