ENV [ System Debug Reference Manual ] MPE/iX 5.0 Documentation
System Debug Reference Manual
ENV
Assigns a new value to one of the predefined environment variables.
Syntax
ENV var_name [=] var_value
The environment variables allow control and inspection of the operation
of System Debug.
Parameters
var_name The name of the environment variable to set.
var_value The new value for the variable, which can be an
expression.
The environment variables are logically organized in the
following groups:
(cmd) Command related
(cmreg) Compatibility mode registers
(const) Predefined constants
(fpreg) Native mode floating-point registers
(io) Input/output related
(limits) Limits
(misc) Miscellaneous
(nmreg) Native mode registers
(system) System-wide Debug registers
(state) All nmreg + cmreg + fpreg registers
(win) Window
Access rights abbreviations are listed below. PM
indicates that privileged mode (PM) capability is
required.
d Display access (DR command)
D PM display access (DR command)
m Modify access (MR command)
M PM modify access (MR command)
r Read access
R PM read access
w Write access
W PM write access
Two names separated by a hyphen indicate a range of
names. For example, ARG0 - ARG3 implies the full range:
ARG0, ARG1, ARG2, and ARG3.
The Environment Variables - Sorted by Group
The following table lists all environment variables, arranged by their
logical groups. A full alphabetically-sorted listing and description of
each variable can be found following this table.
const - constants
const r FALSE : BOOL
const r TRUE : BOOL
cmd - command related
cmd rw AUTOIGNORE : BOOL
cmd rw AUTOREPEAT : BOOL
cmd rw CMDLINESUBS : BOOL
cmd rw CMDNUM : U32
cmd rw ECHO_CMDS : BOOL
cmd rw ECHO_SUBS : BOOL
cmd rw ECHO_USE : BOOL
cmd rw ERROR : S32
cmd r MACRO_DEPTH : U16
cmd rw MULTI_LINE_ERRS : U16
cmd rw NONLOCALVARS : BOOL
cmd rw TRACE_FUNC : U16
io - input/output
io rw CM_INBASE : STR
io rw CM_OUTBASE : STR
io r COLUMN : U16
io rW CONSOLE_IO : BOOL (Debug only)
io rw FILL : STR
io rw FILTER : STR
io rw HEXUPSHIFT : BOOL
io rw INBASE : STR
io rw JUSTIFY : STR
io rw LIST_INPUT : BOOL
io rw LIST_PAGELEN : U16
io r LIST_PAGENUM : U16
io rw LIST_PAGING : BOOL
io rw LIST_TITLE : STR
io rw LIST_WIDTH : U16
io rw NM_INBASE : STR
io rw NM_OUTBASE : STR
io rw OUTBASE : STR
io rw PROMPT : STR
io rw TERM_KEEPLOCK : BOOL (Debug only)
io rW TERM_LDEV : U16 (Debug only)
io rw TERM_LOCKING : BOOL (Debug only)
io rw TERM_LOUD : BOOL
io rw TERM_PAGING : BOOL
io rw TERM_WIDTH : U16
misc - miscellaneous
misc r d CPU : U16
misc rW CCODE : STR (Debug only)
misc rW CSTBASE : LPTR
misc r DATE : STR
misc r DISP : BOOL
misc rW DSTBASE : LPTR
misc r ENTRY_MODE : STR
misc rW ESCAPECODE : U32 (debug only)
misc r EXEC_MODE : STR
misc r ICSNEST : U16
misc r ICSVA : LPTR
misc r LASTPIN : U16
misc rw LOOKUP_ID : STR
misc r MODE : STR
misc r d MONARCHCPU : u16
misc r PIN : U16
misc rW PRIV_USER : BOOL
misc r PROGNAME : STR
misc rw PSTMT : U16
misc rw QUIET_MODIFY : BOOL
misc r SYSVERSION : STR
misc r TIME : STR
misc r VERSION : STR
win - window
win rw CHANGES : STR
win rw CMPW : LCPTR
win r LW : LPTR
win rw MARKERS : STR
win r NMPW : LCPTR
win r PW : LCPTR
win r PWO : SPTR
win r PWS : U32
win r SHOW_CCTL : BOOL
win r VW : LPTR
win r VWO : SPTR
win r VWS : U32
win rw WIN_LENGTH : U32
win rw WIN_WIDTH : U32
win r ZW : U32
limits - limits for macros and variables
limits rw MACROS : U16
limits r MACROS_LIMIT : U16
limits rw VARS : U16
limits r VARS_LIMIT : U16
limits rw VARS_LOC : U16
limits r VARS_TABLE : U16
cmreg - compatibility mode regs
cmreg r dm CIR : S16
cmreg r dm CMPC : LCPTR
cmreg r dm DB : S16
cmreg r dm DBDST : S16
cmreg r dm DL : S16
cmreg r d MAPDST : S16
cmreg r d MAPFLAG : S16
cmreg r dm Q : S16
cmreg r dm S : S16
cmreg r dm SDST : S16
cmreg r dm STATUS : S16
cmreg r dm X : S16
nmreg - native mode regs
nmreg r dm ARG0 - ARG3 : U32
nmreg r dM CCR : U16
nmreg r dm CR0 : U32
nmreg r dm CR8 - CR31 : U32
nmreg r dm DP : U32
nmreg r dM EIEM : U32
nmreg r dM EIRR : U32
nmreg r dM IIR : U32
nmreg r dM IOR : U32
nmreg r dM IPSW : U32
nmreg r dM ISR : U32
nmreg r dM ITMR : U32
nmreg r dM IVA : U32
nmreg r dm PC : LPTR
nmreg r dm PCOB : U32
nmreg r dm PCOF : U32
nmreg r dm PCQB : LPTR
nmreg r dm PCQF : LPTR
nmreg r dm PCSB : U32
nmreg r dm PCSF : U32
nmreg r dM PID1 - PID4 : U16
nmreg r dM PRIV : BOOL
nmreg r d PSP : U32
nmreg r dM PSW : U32
nmreg r d R0 : U32
nmreg r dm R1 - R31 : U32
nmreg r dM RCTR : U32
nmreg r dm RET0 : U32
nmreg r dm RET1 : U32
nmreg r d RP : U32
nmreg r dm SAR : U16
nmreg r dm SL : U32
nmreg r dm SP : U32
nmreg r dm SR0 - SR7 : U32
nmreg r dM TR0 - TR7 : U32
fpreg - floating point regs
fpreg r dM FP0 - FP15 : LPTR (until S64 is supported)
fpreg r dM FPE0 - FPE7 : U32
fpreg r dM FPSTATUS : U32
system - system wide debug
system rW CONSOLE_DEBUG : BOOL (Debug only)
system rW DYING_DEBUG : BOOL (Debug only)
system rW JOB_DEBUG : BOOL (Debug only)
state - process state
The state variables consist of all NMREG, CMREG, and FPREG variables.
The Environment Variables - Sorted Alphabetically
The following table lists all predefined environment variables. Each
variable description displays on the first line the variable name and
type, group name in parentheses, and access rights, for example:
name TYPE (group) access [*]
Environment variable description
Those variables flagged with a "*" have their value reset to their
default value if the SET DEFAULT command is issued.
ARG0 - ARG3 U32 (nmreg) r dm
NM argument registers. These registers are used by the
language compilers for parameter passing. (Alias for
R26 - R23)
AUTOIGNORE BOOL (cmd) rw *
Setting AUTOIGNORE is equivalent to using the IGNORE
LOUD command before every command. When AUTOIGNORE is
set, System Debug ignores errors (that is, the ERROR
variable contains a negative value). Among other
things, this means that System Debug continues
processing USE files, macros, and looping constructs
even though an error occurs while doing so. (Refer to
the IGNORE command.) The default for this variable is
FALSE.
AUTOREPEAT BOOL (cmd) rw
Controls the automatic repetition of the last command
whenever a lone carriage return is entered. Setting
AUTOREPEAT allows repetitive operations (such as single
stepping or PF) to be automatically executed by pressing
Return. This variable may also be altered with the SET
CRON and SET CROFF commands. The default value for the
AUTOREPEAT variable is FALSE.
CCODE STR (misc) rW
Condition code. This value is captured on entry to
Debug. It is restored when the debugger resumes the
process. Since Debug itself causes the condition code
for the process to change, it is necessary to cache the
original value. The following string literals are
valid: "CCE", "CCG", "CCL".
CCR U16 (nmreg) r dM
NM coprocessor configuration register. (Alias for CR10)
CHANGES STR (win) rw
Selects the type of video enhancement used to flag
window values modified since the last command. The
following string literals are valid: "INVERSE",
"HALFINV", "BLINK", "ULINE", and "FEABLE". Note that
this is a string variable; thus, literals must be
quoted. The default value is "HALFINV".
CIR U16 (cmreg) r dm
CM current instruction register.
CMDLINESUBS BOOL (cmd) rw
Setting CMDLINESUBS enables command line substitutions
(for example, expanding the "|" character in-line).
When macro bodies use command line substitutions, it is
sometimes desirable to disable CMDLINESUBS while reading
the macro definitions in from a USE file. (Refer to the
ECHO_SUBS variable). The default for this variable is
TRUE.
CMDNUM U32 (cmd) rw
The current command number is maintained as a running
counter. This value is displayed as part of the default
prompt string.
CMPC LCPTR (cmreg) r
The full logical code address for CM, based on the
current logical code file, logical segment number, and
offset.
CMPW LCPTR (win) r
The address (as a logical code address) where the CM
program window is aimed.
CM_INBASE STR (io) rw
The current CM input conversion base. When in cmdebug,
all values entered are assumed to be in this base unless
otherwise specified. The following values are allowed:
% or OCTAL
# or DECIMAL
$ or HEXADECIMAL
The names may be abbreviated to a single character. The
default value is % (octal). Refer to the SET command
for an alternate method of setting this variable.
CM_OUTBASE STR (io) rw *
The current CM output display base. The following
values are allowed:
% or OCTAL
# or DECIMAL
$ or HEXADECIMAL
The names may be abbreviated to a single character. The
default value is % (octal). Refer to the SET command
for an alternate method of setting this variable.
COLUMN U16 (io) rw
The current character position in the user's output
buffer. The position is advanced by the W and WCOL
commands (or by the C directive in a format
specification). Refer to the W command for details.
CONSOLE_DEBUG BOOL (system) rW
If this system-wide flag is set, all processes entering
the debugger for the first time automatically have their
debug I/O performed at the system console with the
system console I/O routines. Processes that have
already entered Debug and have established a debugging
environment are not affected by this variable. When
this variable is set, the CONSOLE_IO variable is set to
TRUE for all processes entering Debug for the first
time. Setting CONSOLE_DEBUG is useful when doing system
debugging. If global breakpoints have been set, all of
the I/O can be directed to one terminal by setting this
variable. The default value is FALSE.
This variable is not available in DAT.
CONSOLE_IO BOOL (io) rW
If set, the current process uses the system console I/O
routines to perform Debug I/O. No other processes are
affected by this command. Note that this variable has
precedence over the TERM_LDEV variable. System
processes and jobs entering Debug (assuming the
JOB_DEBUG environment variable was set), has this
variable set to TRUE upon entry to the debugger. The
default value is FALSE.
This variable is not available in DAT.
CPU U16 (misc) r d
The CPU number of the processor that is being examined.
CR0 U32 (nmreg) r dm
NM control register 0 (alias for RCTR). Debug uses this
value while single stepping.
CR8 - CR31 U32 (nmreg) r dm
NM control registers. These registers have the
following aliases and names (for descriptions of their
usage, refer to the Precision Architecture and
Instruction Reference Manual (09740-90014)):
Register Alias Description
--------------------------------------------------------------------------------------
CR0 RCTR Recovery counter
CR8 PID1 Protection ID 1
CR9 PID2 Protection ID 2
CR10 CCR Coprocessor configuration
register
CR11 SAR Shift amount register
CR12 PID3 Protection ID 3
CR13 PID4 Protection ID 4
CR14 IVA Interrupt vector address
CR15 EIEM External interrupt enable
mask
CR16 ITMR Interval timer
CR17 PCSF PC space queue front
CR18 PCOF PC offset queue front
CR19 IIR Interrupt instruction
register
CR20 ISR Interrupt space register
CR21 IOR Interrupt offset register
CR22 IPSW PSW Interrupt processor status
word
CR23 EIRR External interrupt request
register
CR24 TR0 Temporary register 0
:
CR31 TR7 Temporary register 7
Refer to the PID environment variable entry for a
detailed description of the format of PID registers.
Refer to the IPSW environment variable entry for a
detailed description of the format for the PSW register.
CSTBASE LPTR (misc) rW
The virtual address of the CST table.
DATE STR (misc) r
The current date string in the form 'WED, OCT 14, 1951'.
DB U16 (cmreg) r dm
The CM DB register.
DBDST U16 (cmreg) r dm
The CM DB DST number.
DISP BOOL (misc) r
A Boolean value that indicates whether or not the
dispatcher is currently running. This value is always
FALSE in Debug.
DL U16 (cmreg) r dm
The CM DL register.
DP U32 (nmreg) r dm
NM global data pointer register. (Alias for R27)
DSTBASE LPTR (misc) rW
The virtual address of the CM DST table.
DYING_DEBUG BOOL (system) rW
When a process is being killed, its state is said to be
"dying." Once a process is in this state, Debug normally
ignore all breakpoints, traps, and so on. If this
system-wide variable is set to TRUE, Debug stops for all
events even if the process is dying. This is useful to
operating system developers only. It is possible to
cause system failures if this variable is turned on and
breakpoints are set at inappropriate locations. The
default value for this variable is FALSE.
This variable is not available in DAT.
ECHO_CMDS BOOL (cmd) rw *
When ECHO_CMDS is set, each command (other than those
executed within macros) is echoed just prior to its
execution. The default value for this variable is
FALSE.
ECHO_SUBS BOOL (cmd) rw *
When ECHO_SUBS is set, and CMDLINESUBS is enabled,
command line substitutions are displayed as they are
performed. In the following example, the first line
displays the location of the substitution and the second
line displays the result after the substitution has
taken place. The default value for this variable is
FALSE.
subs > fv a.c0341450 "|symfile :student_record"
/\
done > fv a.c0341450 "gradtyp:student_record"
ECHO_USE BOOL (cmd) rw *
When ECHO_USE is set, each command line that is read in
from a use file is echoed (along with the name of the
USE file), prior to its execution. The USE file name is
used as the prompt. The default value for this variable
is FALSE.
EIEM U32 (nmreg) r dm
NM external interrupt enable mask. (Alias for CR15)
EIRR U32 (nmreg) r dM
The NM external interrupt request register. (Alias for
CR23)
ENTRY_MODE STR (misc) r
This variable contains either "NM" or "CM". For Debug,
it indicates whether you entered stopped in cmdebug or
nmdebug. For DAT, it just tracks the MODE variable.
ERROR S32 (cmd) rw
The ERROR variable contains the most recent error
number. It is cleared on entry to any user-defined
macro. Refer to the IGNORE command, the ENV variable
AUTOIGNORE, and the "Error Handling" section in Chapter
2 for additional error handling information. Note that
only negative values constitute errors. Positive values
are warnings.
ESCAPECODE U32 (misc) rW
This is the last ESCAPECODE value that was stored for
the process at the moment Debug was entered. This
variable is restored when the debugger resumes execution
of the process. Since Debug itself causes the escape
code for the process to change, it is necessary to cache
the original value.
This variable is not available in DAT.
EXEC_MODE STR (misc) r
This variable contains either "NM" or "CM". It
indicates the execution mode of the current process.
This value is obtained from the TCB (operating system
data structure). This value does not necessarily match
the ENTRY_MODE variable.
FALSE BOOL (const) r
The constant FALSE.
FILL STR (io) rw *
This variable determines how leading zeros in
right-justified data (refer to JUSTIFY variable) are
output from the Display commands and in the windows.
This variable may take on one of two quoted literal
values: "BLANK" (show leading zeros as blanks) or
"ZERO" (show leading zeros as zeros). The default value
is "ZERO".
FILTER STR (io) rw *
All output, with the exception of error messages and the
prompts, passes through a final filtering process.
Those lines that match the value in the FILTER variable
are displayed and the rest are discarded. By default,
FILTER is initialized to the blank string (&'&', &"&",
or ) that matches all output. FILTER can be set to a
regular expression for the purpose of pattern matching.
For example, the following shows how to find the pattern
"123" in memory. Only a line that contains "123"
anywhere in the line is displayed. Note that FILTER is
displayed as part of the default prompt.
$6 ($10) nmdat > env FILTER 123
$7 ($10) nmdat 123> dv a.c0000000, 4000
$ VIRT a.c0001020 $ 40020330 4002033c 40012348 c0002342
$ VIRT a.c0001238 $ c0062344 ffffffff fffffec2 00000004
$ VIRT a.c0003240 $ 00000001 0000cf42 40012362 000000bc
$8 ($10) nmdat 123> env filter "
$9 ($10) nmdat >
Three lines of output were matched. The pattern "123"
has been highlighted in the example to help point out
where the pattern was found in the line. Notice that
one of the lines contained the pattern as part of the
address displayed by the DV command. We could use a
fancier regular expression to have just those lines with
a "123" in the data part of the output be displayed. In
the following example, the regular expression translates
into "Match those lines that start with a dollar sign
(^$), are followed by any number of any characters (.*),
that are followed by a dollar sign and a space ($ ), and
followed by any number of any character (.*), and
finally followed by characters 123 (123)."
$a ($10) nmdat > env FILTER `^$.*$ .*123`
$b ($10) nmdat ^$.*$ .*123> dv a.c0000000, 4000
$ VIRT a.c0001020 $ 40020330 4002033c 40012348 c0002342
$ VIRT a.c0003240 $ 00000001 0000cf42 40012362 000000bc
$c ($10) nmdat ^$.*$ .*123> set def
$d ($10) nmdat >
Note that only those lines with "123" as part of the
data output by the DV command were matched and
displayed. For additional information on how to specify
regular expressions, refer to appendix A.
FP0-FP15 LPTR (fpreg) r dm
NM floating-point registers 0-15. The 64 bits of these
registers are presented as long pointers until System
Debug supports 64-bit integers.
FPE1-FPE7 S32 (fpreg) r dm
NM floating-point exception registers 1-7. These
registers are extracted from FP0-FP3. That is, FPE1 is
an alias for the right 32 bits of FP0, FPE2 is an alias
for the left 32 bits of FP1, and so on. (Refer to the
Precision Architecture and Instruction Reference Manual
(09740-90014).)
FPSTATUS U32 (fpreg) r dm
NM floating-point status register. (Alias for the left
32 bits of FP0.)
HEXUPSHIFT BOOL (io) r *
If TRUE, all hex output is displayed in uppercase;
otherwise it is displayed in lowercase. The default is
FALSE, lowercase.
ICSNEST U16 (misc) r
The current ICS nest count as found in the base of the
ICS. This value is always 0 for Debug.
ICSVA LPTR (misc) r
The virtual address for the base of the ICS.
IIR U32 (nmreg) r dM
NM interrupt instruction register. (Alias for CR19)
INBASE STR (io) rw *
The current input conversion radix, which is based on
the current mode. Values entered are assumed to be in
this radix unless otherwise specified. This variable
tracks NM_INBASE and CM_INBASE dependent upon the MODE
variable. The following values are allowed:
% or OCTAL
# or DECIMAL
$ or HEXADECIMAL
The names may be abbreviated to 1 character.
The default is based on the current mode (NM or CM).
Refer to the SET command for an alternate method of
setting this variable.
IOR U32 (nmreg) r dM
NM interrupt offset register. (Alias for CR21)
IPSW U32 (nmreg) r dM
NM interrupt processor status word (alias for CR22 and
PSW). Debug may set or alter the "R" bit while single
stepping, as well as the "T" bit if the TRAP BRANCH ARM
command has been issued.
This register has the following format:
1 1 1 1 1 1 1 2 2 2 2 3 3
0 7 8 9 0 1 2 3 4 5 6 4 7 8 9 0 1
-----------------------------------------------------------------
|J| |T|H|L|N|X|B|C|V|M| C/B | |R|Q|P|D|I|
-----------------------------------------------------------------
J Joint instruction and data TLB
misses/page faults pending
T Taken branch trap enabled
H Higher-privilege transfer trap enable
L Lower-privilege transfer trap enable
N Instruction whose address is at front
of PC queue is nullified
X Data memory break disable
B Taken branch in previous cycle
C Code address translation enable
V Divide step correction
M High-priority machine check disable
C/B Carry/borrow bits
R Recovery counter enable
Q Interruption state collection enable
P Protection ID validation enable
D Data address translation enable
I External, power failure, & low-priority
machine check interruption enable
System Debug displays this register in two formats:
IPSW=$6ff0b=jthlnxbCVmrQpDI
The first value is a full 32-bit integer representation
of the register. The second format shows the value of
the special named bits. An uppercase letter means the
bit is ON while a lowercase letter indicates the bit is
OFF.
MPE/iX 5.0 Documentation