System Debug Reference Manual (32650-90888)
40 Chapter2
User Interface
Environment Variables
Environment Variables
System Debug provides a large collection of predefined environment variables, the names
of which are reserved and may not be replaced by user-defined variables with the VAR and
LOC commands.
Several environment variables provide access to the current System Debug execution
environment. Examples of these variables include the current input radix and the prompt
string. Other environment variables are used to access key components of the state of the
machine being examined. For example, all of the machine registers defined in the HP 3000
and HP Precision Architectures are available as environment variables. Subject to the
context of use, some of these variables may be set by the user with the ENV command. The
environment variables that correspond to the CM and NM machine registers are also
accessible through the MR (modify register) and DR (display register) commands. All
environment variables may be read (accessed) as expression operands. Some environment
variables also require privileged mode for modification access.
The ENV command in chapter 4 gives a detailed description of each of the predefined
environment variables and specifies which ones may be modified and which ones are
read-only.
Predefined Functions
A large collection of predefined functions exist that provide access to the machine being
debugged, as well as those which perform various operations on values of the data types
supported by System Debug.
Syntactically, a function reference appears as an operand in an expression and is denoted
by its name, followed optionally by a list of parameters surrounded by parentheses.
Multiple parameters are separated from one another by either spaces or commas.
Functions evaluate to a single value of some type.
Detailed descriptions of all the System Debug predefined functions may be found in
chapter 8.
Macros
System Debug supports an extensive macro facility that allows users to define a sequence
of commands that may be invoked either as a command or as a function in an expression.
The MAC command is used to define a macro, as the following examples illustrate:
$nmdebug > mac double (n=2) { return n * 2 }