System Debug Reference Manual (32650-90888)
206 Chapter6
System Debug Command Specifications M-X
MAC[RO]
(
parm1def parm2def, parm3def, parm4def parm5def
)
Parameter names have the same restrictions as macro names. Names
must begin with an alphabetic character and are restricted to thirty-two
(32) characters, that must be alphanumeric, or an underscore (_), a single
quotation (`or'), or a dollar sign ($). Longer names are truncated (with a
warning). Names are case insensitive.
Each parameter definition can include an optional parmtype declaration
that must follow after a colon. In addition, a default initial value for the
parameter can optionally be specified, preceded by an equal sign. The
initial value can be an expression. Below is a syntax of a parameter
description, followed by examples:
(
parmname1
[:
parmtype1
] [=
parm_default_value1
], ..
( addr:sptr=c000104c, len=0, count=20 )
( p1:u32=$100, p2=40-!count p3:str="totals")
When a macro is invoked, a local variable is declared for each parameter,
just as if the following command(s) had been entered:
LOC parmname1 :type1= default1
LOC parmname2 :type2= default2 ... etc.
Parameters are referenced within the macro body in the same manner
that local variables are referenced. The parameter name can be preceded
by an optional exclamation mark (!) to avoid ambiguity.
When execution of the macro body is completed, the local variables
declared for the parameters are automatically deleted.
{
body
} The macro body is a single command, or a list of commands, entered
between curly braces. Multiple commands must be separated by
semicolons. The commands in this body are executed whenever the macro
is invoked. For example:
{
CMD
}
{
CMD1
;
CMD2
;
CMD3
; ..
CMDn
}
Unterminated command lists, introduced by the left curly brace, can span
multiple lines without the use of the continuation character (&) between
lines. Additional command lines are automatically digested as part of the
cmdlist
until the closing right brace is detected.
{
CMD1
;
CMD2
;
CMD3
;
...
CMDn
}
The RETURN command is used within the macro body to return a specified
value and to exit the macro immediately. If a RETURN command is not
supplied within the macro body, the macro exits when all commands have
been executed, and the default return value is used.
options
Special macro options can be specified following the parameter