VxWorks Reference Manual : Libraries
dbgArchLib - architecture-dependent debugger library
g0( ) - return the contents of register g0, also g1 - g7 (SPARC) and g1 - g14 (i960)
a0( ) - return the contents of register a0 (also a1 - a7) (MC680x0)
d0( ) - return the contents of register d0 (also d1 - d7) (MC680x0)
sr( ) - return the contents of the status register (MC680x0, SH)
psrShow( ) - display the meaning of a specified psr value, symbolically (SPARC)
fsrShow( ) - display the meaning of a specified fsr value, symbolically (SPARC)
o0( ) - return the contents of register o0 (also o1 - o7) (SPARC)
l0( ) - return the contents of register l0 (also l1 - l7) (SPARC)
i0( ) - return the contents of register i0 (also i1 - i7) (SPARC)
npc( ) - return the contents of the next program counter (SPARC)
psr( ) - return the contents of the processor status register (SPARC)
wim( ) - return the contents of the window invalid mask register (SPARC)
y( ) - return the contents of the y register (SPARC)
pfp( ) - return the contents of register pfp (i960)
tsp( ) - return the contents of register sp (i960)
rip( ) - return the contents of register rip (i960)
r3( ) - return the contents of register r3 (also r4 - r15) (i960)
fp( ) - return the contents of register fp (i960)
fp0( ) - return the contents of register fp0 (also fp1 - fp3) (i960KB, i960SB)
pcw( ) - return the contents of the pcw register (i960)
tcw( ) - return the contents of the tcw register (i960)
acw( ) - return the contents of the acw register (i960)
dbgBpTypeBind( ) - bind a breakpoint handler to a breakpoint type (MIPS R3000, R4000)
edi( ) - return the contents of register edi (also esi - eax) (i386/i486)
eflags( ) - return the contents of the status register (i386/i486)
r0( ) - return the contents of register r0 (also r1 - r14) (ARM)
cpsr( ) - return the contents of the current processor status register (ARM)
psrShow;1( ) - display the meaning of a specified PSR value, symbolically (ARM)
r0( ) - return the contents of general register r0 (also r1-r15) (SH)
gbr( ) - return the contents of the global base register (SH)
vbr( ) - return the contents of the vector base register (SH)
mach( ) - return the contents of system register mach (SH)
macl( ) - return the contents of system register macl (SH)
pr( ) - return the contents of system register pr (SH)
This module provides architecture-specific support functions for dbgLib. It also includes user-callable functions for accessing the contents of registers in a task's TCB (task control block). These routines include:
Note: The routine pc( ), for accessing the program counter, is found in usrLib.
MC680x0: a0( ) - a7( ) - address registers (a0 - a7) d0( ) - d7( ) - data registers (d0 - d7) sr( ) - status register (sr) SPARC
psrShow( ) - psr value, symbolically fsrShow( ) - fsr value, symbolically g0( ) - g7( ) - global registers (g0 - g7) o0( ) - o7( ) - out registers (o0 - o7, note lower-case "o") l0( ) - l7( ) - local registers (l0 - l7, note lower-case "l") i0( ) - i7( ) - in registers (i0 - i7) npc( ) - next program counter (npc) psr( ) - processor status register (psr) wim( ) - window invalid mask (wim) y( ) - y register i960: g0( ) - g14( ) - global registers r3( ) - r15( ) - local registers tsp( ) - stack pointer rip( ) - return instruction pointer pfp( ) - previous frame pointer fp( ) - frame pointer fp0( ) - fp3( ) - floating-point registers (i960 KB and SB only) pcw( ) - processor control word tcw( ) - trace control word acw( ) - arithmetic control word MIPS
dbgBpTypeBind( ) - bind a breakpoint handler to a breakpoint type i386/i486: edi( ) - eax( ) - named register values eflags( ) - status register value SH
r0( ) - r15( ) - general registers (r0 - r15) sr( ) - status register (sr) gbr( ) - global base register (gbr) vbr( ) - vector base register (vbr) mach( ) - multiply and accumulate register high (mach) macl( ) - multiply and accumulate register low (macl) pr( ) - procedure register (pr) ARM
r0( ) - r14( ) - general-purpose registers (r0 - r14) cpsr( ) - current processor status reg (cpsr) psrShow( ) - psr value, symbolically
dbgLib, VxWorks Programmer's Guide: Target Shell
g0( ) - return the contents of register g0, also g1 - g7 (SPARC) and g1 - g14 (i960)
int g0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of global register g0 from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
Routines are provided for all global registers:
SPARC
g0( ) - g7( ) (g0 - g7) i960: g0( ) - g14( ) (g0 - g14)
The contents of register g0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
a0( ) - return the contents of register a0 (also a1 - a7) (MC680x0)
int a0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register a0 from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
Similar routines are provided for all address registers (a0 - a7): a0( ) - a7( ).
The stack pointer is accessed via a7( ).
The contents of register a0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
d0( ) - return the contents of register d0 (also d1 - d7) (MC680x0)
int d0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register d0 from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
Similar routines are provided for all data registers (d0 - d7): d0( ) - d7( ).
The contents of register d0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
sr( ) - return the contents of the status register (MC680x0, SH)
int sr ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the status register from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of the status register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
psrShow( ) - display the meaning of a specified psr value, symbolically (SPARC)
void psrShow ( ULONG psrValue /* psr value to show */ )
This routine displays the meaning of all the fields in a specified psr value, symbolically.
Extracted from psl.h:
Definition of bits in the Sun-4 PSR (Processor Status Register) ------------------------------------------------------------------------ | IMPL | VER | ICC | resvd | EC | EF | PIL | S | PS | ET | CWP | | | | N | Z | V | C | | | | | | | | | |------|-----|---|---|---|---|-------|----|----|-----|---|----|----|-----| 31 28 27 24 23 22 21 20 19 14 13 12 11 8 7 6 5 4 0For compatibility with future revisions, reserved bits are defined to be initialized to zero and, if written, must be preserved.
-> psrShow 0x00001FE7 Implementation 0, mask version 0: Fujitsu MB86900 or LSI L64801, 7 windows no SWAP, FSQRT, CP, extended fp instructions Condition codes: . . . . Coprocessor enables: . EF Processor interrupt level: f Flags: S PS ET Current window pointer: 0x07 ->
N/A
dbgArchLib, psr( ), SPARC Architecture Manual
fsrShow( ) - display the meaning of a specified fsr value, symbolically (SPARC)
void fsrShow ( UINT fsrValue /* fsr value to show */ )
This routine displays the meaning of all the fields in a specified fsr value, symbolically.
Extracted from reg.h:
Definition of bits in the Sun-4 FSR (Floating-point Status Register) ------------------------------------------------------------- | RD | RP | TEM | res | FTT | QNE | PR | FCC | AEXC | CEXC | |-----|---- |-----|------|-----|-----|----|-----|------|------| 31 30 29 28 27 23 22 17 16 14 13 12 11 10 9 5 4 0For compatibility with future revisions, reserved bits are defined to be initialized to zero and, if written, must be preserved.
-> fsrShow 0x12345678 Rounding Direction: nearest or even if tie. Rounding Precision: single. Trap Enable Mask: underflow. Floating-point Trap Type: IEEE exception. Queue Not Empty: FALSE; Partial Remainder: TRUE; Condition Codes: less than. Accumulated exceptions: inexact divide-by-zero invalid. Current exceptions: overflow invalid
N/A
dbgArchLib, SPARC Architecture Manual
o0( ) - return the contents of register o0 (also o1 - o7) (SPARC)
int o0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of out register o0 from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
Similar routines are provided for all out registers (o0 - o7): o0( ) - o7( ).
The stack pointer is accessed via o6.
The contents of register o0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
l0( ) - return the contents of register l0 (also l1 - l7) (SPARC)
int l0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of local register l0 from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
Similar routines are provided for all local registers (l0 - l7): l0( ) - l7( ).
The contents of register l0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
i0( ) - return the contents of register i0 (also i1 - i7) (SPARC)
int i0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of in register i0 from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
Similar routines are provided for all in registers (i0 - i7): i0( ) - i7( ).
The frame pointer is accessed via i6.
The contents of register i0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
npc( ) - return the contents of the next program counter (SPARC)
int npc ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the next program counter from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
The contents of the next program counter.
dbgArchLib, ti( )
psr( ) - return the contents of the processor status register (SPARC)
int psr ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the processor status register from the TCB of a specified task. If taskId is omitted or 0, the default task is assumed.
The contents of the processor status register.
dbgArchLib, psrShow( ), VxWorks Programmer's Guide: Target Shell
wim( ) - return the contents of the window invalid mask register (SPARC)
int wim ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the window invalid mask register from the TCB of a specified task. If taskId is omitted or 0, the default task is assumed.
The contents of the window invalid mask register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
y( ) - return the contents of the y register (SPARC)
int y ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the y register from the TCB of a specified task. If taskId is omitted or 0, the default task is assumed.
The contents of the y register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
pfp( ) - return the contents of register pfp (i960)
int pfp ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register pfp, the previous frame pointer, from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
The contents of the pfp register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
tsp( ) - return the contents of register sp (i960)
int tsp ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register sp, the stack pointer, from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
Note: The name tsp( ) is used because sp( ) (the logical name choice) conflicts with the routine sp( ) for spawning a task with default parameters.
The contents of the sp register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
rip( ) - return the contents of register rip (i960)
int rip ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register rip, the return instruction pointer, from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
The contents of the rip register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
r3( ) - return the contents of register r3 (also r4 - r15) (i960)
int r3 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register r3 from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
Routines are provided for all local registers (r3 - r15): r3( ) - r15( ).
The contents of the r3 register (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
fp( ) - return the contents of register fp (i960)
int fp ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register fp, the frame pointer, from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
The contents of the fp register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
fp0( ) - return the contents of register fp0 (also fp1 - fp3) (i960KB, i960SB)
double fp0 ( volatile int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the floating-point register fp0 from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
Routines are provided for the floating-point registers fp0 - fp3: fp0( ) - fp3( ).
The contents of the fp0 register (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
pcw( ) - return the contents of the pcw register (i960)
int pcw ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the pcw register from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
The contents of the pcw register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
tcw( ) - return the contents of the tcw register (i960)
int tcw ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the tcw register from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
The contents of the tcw register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
acw( ) - return the contents of the acw register (i960)
int acw ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the acw register from the TCB of a specified task. If taskId is omitted or 0, the current default task is assumed.
The contents of the acw register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
dbgBpTypeBind( ) - bind a breakpoint handler to a breakpoint type (MIPS R3000, R4000)
STATUS dbgBpTypeBind ( int bpType, /* breakpoint type */ FUNCPTR routine /* function to bind */ )
Dynamically bind a breakpoint handler to breakpoints of type 0 - 7. By default only breakpoints of type zero are handled with the function dbgBreakpoint( ) (see dbgLib). Other types may be used for Ada stack overflow or other such functions. The installed handler must take the same parameters as excExcHandle( ) (see excLib).
OK, or ERROR if bpType is out of bounds.
edi( ) - return the contents of register edi (also esi - eax) (i386/i486)
int edi ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register edi from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
Similar routines are provided for all address registers (edi - eax): edi( ) - eax( ).
The stack pointer is accessed via eax( ).
The contents of register edi (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Target Shell
eflags( ) - return the contents of the status register (i386/i486)
int eflags ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the status register from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of the status register.
dbgArchLib, VxWorks Programmer's Guide: Target Shell
r0( ) - return the contents of register r0 (also r1 - r14) (ARM)
int r0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register r0 from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
Similar routines are provided for registers (r1 - r14): r1( ) - r14( ).
The contents of register r0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Debugging
cpsr( ) - return the contents of the current processor status register (ARM)
int cpsr ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the status register from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of the current processor status register.
dbgArchLib, VxWorks Programmer's Guide: Debugging
psrShow( ) - display the meaning of a specified PSR value, symbolically (ARM)
STATUS psrShow ( UINT32 psrval /* psr value to show */ )
This routine displays the meaning of all fields in a specified PSR value, symbolically.
OK, always.
r0( ) - return the contents of general register r0 (also r1-r15) (SH)
int r0 ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of register r0 from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
Similar routines are provided for all general registers (r1 - r15): r1( ) - r15( ).
SH770x processors have two sets of general registers r0 - r7. One set is called BANK0, and another set is called BANK1. The register bank (RB) bit in the status register (SR) defines which banked register set is accessed as r0 - r7. When the RB = 1, BANK1 registers (r0_bank1 - r7_bank1) are accessed as r0 - r7. When the RB = 0, BANK0 registers (r0_bank0 - r7_bank0) are accessed as r0 - r7. Now, all VxWorks tasks run with the RB = 0. Therefore r0( ) - r7( ) routines always return BANK0 register's contents from the TCB.
The contents of register r0 (or the requested register).
dbgArchLib, VxWorks Programmer's Guide: Debugging
gbr( ) - return the contents of the global base register (SH)
int gbr ( int taskId )
This command extracts the contents of the global base register (gbr) from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of register gbr.
dbgArchLib, VxWorks Programmer's Guide: Debugging
vbr( ) - return the contents of the vector base register (SH)
int vbr ( int taskId )
This command extracts the contents of the vector base register (vbr) from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of register vbr.
dbgArchLib, VxWorks Programmer's Guide: Debugging
mach( ) - return the contents of system register mach (SH)
int mach ( int taskId /* task ID, 0 means default task */ )
This command extracts the contents of the multiply and accumulate high register (mach) from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of register mach.
dbgArchLib, VxWorks Programmer's Guide: Debugging
macl( ) - return the contents of system register macl (SH)
int macl ( int taskId )
This command extracts the contents of the multiply and accumulate low register (macl) from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of register macl.
dbgArchLib, VxWorks Programmer's Guide: Debugging
pr( ) - return the contents of system register pr (SH)
int pr ( int taskId )
This command extracts the contents of the procedure register (pr) from the TCB of a specified task. If taskId is omitted or zero, the last task referenced is assumed.
The contents of register pr.
dbgArchLib, VxWorks Programmer's Guide: Debugging