Displaying Registers

You can enter the User Interface from the middle of an executing program as a result of a program crash, a user abort, or an encountered breakpoint. (Breakpoints are discussed on "Breakpoints".) In all these cases, the User Interface automatically saves all the CPU data register values in a buffer area. These values can then be inspected or altered for debugging purposes.

Change the value stored in any of the above registers.
Use in the form: new-value to regname.

w

( window# -- )

Set the current window for displaying %ix, %lx, or %ox.

Table 6-3 SPARC V9 Register Commands

Command

Stack Diagram

Description

%fprs

%asi

%pstate

%tl-c

%pil

%tstate

%tt

%tba

%cwp

%cansave

%canrestore

%otherwin

%wstate

%cleanwin

( -- value )

Return the value in the specified register.

.pstate

( -- )

Formatted display of the processor state register.

.ver

( -- )

Formatted display of the version register.

.ccr

( -- )

Formatted display of the %ccr register.

.trap-registers

( -- )

Display trap-related registers.

The values of all of these registers are saved and can be altered with to. After the values have been inspected and/or modified, program execution can be continued with the go command. The saved (and possibly modified) register values are copied back into the CPU, and execution resumes at the location specified by the saved program counter.

If you change %pc with to, you should also change %npc. (It is easier to use set-pc, which changes both registers automatically.)

On SPARC V9 systems, if Nis the current window, N-1 specifies the window for the caller, N-2 specifies the callers's caller, etc.