System Debug Reference Manual (32650-90888)

188 Chapter5
System Debug Command Specifications Fx-LOG
LEV
LEV
Sets the current environment to the specified stack level in the stack markers.
Syntax
LEV [
number
]
LEV [
number
] [
interrupt_level
]
The LEV command changes the current environment to the environment at the specified
stack level.
All commands accurately reflect the register values that are in effect a level change.
Windows also reflect the new level values.
If the CONTINUE or SS command in Debug is issued after changing levels, an implicit LEV 0
is performed.
If any error is encountered during a level change, the environment is automatically set to
stack level 0.
The following algorithm is used to set level
n
on the CM stack:
WHILE lev <> desired level DO
Get previous stack marker.
Set Q based on delta-Q in marker.
Set S to Q-4.
Set X based on X in marker.
Set STATUS based on status marker.
Set CMPC based on status and P offset in marker.
Set CIR based on fetch from new value of CMPC.
The following algorithm is used to set level
n
on the NM stack:
Get current frame info (based on unwind info);
WHILE lev <> desired level DO
Restore entry save registers (based on frame unwind info);
Get previous frame (based on unwind info);
IF frame is an interrupt stack marker (ISM) THEN
Restore RP, SP, DP, SR4, SR5, SR0, PCQ from the ISM
ELSE
Set RP, SP, DP, SR4, to new values from the stack;
Restore call save registers (based on unwind info);