Solaris Dynamic Tracing Guide
Previous Next

uregs[] Array

The uregs[] array enables you to access individual user registers. The following tables list indices into the uregs[] array corresponding to each supported Solaris system architecture.

Table 33-1 SPARC uregs[] Constants

Constant

Register

R_G0..R_G7

%g0..%g7 global registers

R_O0..R_O7

%o0..%o7 out registers

R_L0..R_L7

%l0..%l7 local registers

R_I0..R_I7

%i0..%i7 in registers

R_CCR

%ccr condition code register

R_PC

%pc program counter

R_NPC

%npc next program counter

R_Y

%y multiply/divide register

R_ASI

%asi address space identifier register

R_FPRS

%fprs floating-point registers state

Table 33-2 x86 uregs[] Constants

Constant

Register

R_CS

%cs

R_GS

%gs

R_ES

%es

R_DS

%ds

R_EDI

%edi

R_ESI

%esi

R_EBP

%ebp

R_EAX

%eax

R_ESP

%esp

R_EAX

%eax

R_EBX

%ebx

R_ECX

%ecx

R_EDX

%edx

R_TRAPNO

%trapno

R_ERR

%err

R_EIP

%eip

R_CS

%cs

R_ERR

%err

R_EFL

%efl

R_UESP

%uesp

R_SS

%ss

On AMD64 platforms, the uregs array has the same content as it does on x86 platforms, plus the additional elements listed in the following table:

Table 33-3 amd64 uregs[] Constants

Constant

Register

R_RSP

%rsp

R_RFL

%rfl

R_RIP

%rip

R_RAX

%rax

R_RCX

%rcx

R_RDX

%rdx

R_RBX

%rbx

R_RBP

%rbp

R_RSI

%rsi

R_RDI

%rdi

R_R8

%r8

R_R9

%r9

R_R10

%r10

R_R11

%r11

R_R12

%r12

R_R13

%r13

R_R14

%r14

R_R15

%r15

The aliases listed in the following table can be used on all platforms:

Table 33-4 Common uregs[] Constants

Constant

Register

R_PC

program counter register

R_SP

stack pointer register

R_R0

first return code

R_R1

second return code

Previous Next