VxWorks Reference Manual : Libraries

dbgArchLib

NAME

dbgArchLib - architecture-dependent debugger library

ROUTINES

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)

DESCRIPTION

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:

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
Note: The routine pc( ), for accessing the program counter, is found in usrLib.

SEE ALSO

dbgLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

g0( )

NAME

g0( ) - return the contents of register g0, also g1 - g7 (SPARC) and g1 - g14 (i960)

SYNOPSIS

int g0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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)

RETURNS

The contents of register g0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

a0( )

NAME

a0( ) - return the contents of register a0 (also a1 - a7) (MC680x0)

SYNOPSIS

int a0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

RETURNS

The contents of register a0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

d0( )

NAME

d0( ) - return the contents of register d0 (also d1 - d7) (MC680x0)

SYNOPSIS

int d0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

RETURNS

The contents of register d0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

sr( )

NAME

sr( ) - return the contents of the status register (MC680x0, SH)

SYNOPSIS

int sr
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the status register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

psrShow( )

NAME

psrShow( ) - display the meaning of a specified psr value, symbolically (SPARC)

SYNOPSIS

void psrShow
    (
    ULONG psrValue /* psr value to show */
    )

DESCRIPTION

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   0
For compatibility with future revisions, reserved bits are defined to be initialized to zero and, if written, must be preserved.

EXAMPLE

     -> 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
     ->

RETURNS

N/A

SEE ALSO

dbgArchLib, psr( ), SPARC Architecture Manual


Libraries : Routines

fsrShow( )

NAME

fsrShow( ) - display the meaning of a specified fsr value, symbolically (SPARC)

SYNOPSIS

void fsrShow
    (
    UINT fsrValue /* fsr value to show */
    )

DESCRIPTION

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    0
For compatibility with future revisions, reserved bits are defined to be initialized to zero and, if written, must be preserved.

EXAMPLE

    -> 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

RETURNS

N/A

SEE ALSO

dbgArchLib, SPARC Architecture Manual


Libraries : Routines

o0( )

NAME

o0( ) - return the contents of register o0 (also o1 - o7) (SPARC)

SYNOPSIS

int o0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of register o0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

l0( )

NAME

l0( ) - return the contents of register l0 (also l1 - l7) (SPARC)

SYNOPSIS

int l0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

RETURNS

The contents of register l0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

i0( )

NAME

i0( ) - return the contents of register i0 (also i1 - i7) (SPARC)

SYNOPSIS

int i0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of register i0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

npc( )

NAME

npc( ) - return the contents of the next program counter (SPARC)

SYNOPSIS

int npc
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the next program counter.

SEE ALSO

dbgArchLib, ti( )


Libraries : Routines

psr( )

NAME

psr( ) - return the contents of the processor status register (SPARC)

SYNOPSIS

int psr
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the processor status register.

SEE ALSO

dbgArchLib, psrShow( ), VxWorks Programmer's Guide: Target Shell


Libraries : Routines

wim( )

NAME

wim( ) - return the contents of the window invalid mask register (SPARC)

SYNOPSIS

int wim
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the window invalid mask register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

y( )

NAME

y( ) - return the contents of the y register (SPARC)

SYNOPSIS

int y
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the y register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

pfp( )

NAME

pfp( ) - return the contents of register pfp (i960)

SYNOPSIS

int pfp
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the pfp register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

tsp( )

NAME

tsp( ) - return the contents of register sp (i960)

SYNOPSIS

int tsp
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the sp register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

rip( )

NAME

rip( ) - return the contents of register rip (i960)

SYNOPSIS

int rip
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the rip register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

r3( )

NAME

r3( ) - return the contents of register r3 (also r4 - r15) (i960)

SYNOPSIS

int r3
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

RETURNS

The contents of the r3 register (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

fp( )

NAME

fp( ) - return the contents of register fp (i960)

SYNOPSIS

int fp
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the fp register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

fp0( )

NAME

fp0( ) - return the contents of register fp0 (also fp1 - fp3) (i960KB, i960SB)

SYNOPSIS

double fp0
    (
    volatile int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

RETURNS

The contents of the fp0 register (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

pcw( )

NAME

pcw( ) - return the contents of the pcw register (i960)

SYNOPSIS

int pcw
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the pcw register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

tcw( )

NAME

tcw( ) - return the contents of the tcw register (i960)

SYNOPSIS

int tcw
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the tcw register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

acw( )

NAME

acw( ) - return the contents of the acw register (i960)

SYNOPSIS

int acw
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the acw register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

dbgBpTypeBind( )

NAME

dbgBpTypeBind( ) - bind a breakpoint handler to a breakpoint type (MIPS R3000, R4000)

SYNOPSIS

STATUS dbgBpTypeBind
    (
    int     bpType, /* breakpoint type */
    FUNCPTR routine /* function to bind */
    )

DESCRIPTION

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).

RETURNS

OK, or ERROR if bpType is out of bounds.

SEE ALSO

dbgArchLib, dbgLib, excLib


Libraries : Routines

edi( )

NAME

edi( ) - return the contents of register edi (also esi - eax) (i386/i486)

SYNOPSIS

int edi
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

RETURNS

The contents of register edi (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

eflags( )

NAME

eflags( ) - return the contents of the status register (i386/i486)

SYNOPSIS

int eflags
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the status register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Target Shell


Libraries : Routines

r0( )

NAME

r0( ) - return the contents of register r0 (also r1 - r14) (ARM)

SYNOPSIS

int r0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

RETURNS

The contents of register r0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging


Libraries : Routines

cpsr( )

NAME

cpsr( ) - return the contents of the current processor status register (ARM)

SYNOPSIS

int cpsr
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of the current processor status register.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging


Libraries : Routines

psrShow( )

NAME

psrShow( ) - display the meaning of a specified PSR value, symbolically (ARM)

SYNOPSIS

STATUS psrShow
    (
    UINT32 psrval /* psr value to show */
    )

DESCRIPTION

This routine displays the meaning of all fields in a specified PSR value, symbolically.

RETURNS

OK, always.

SEE ALSO

dbgArchLib


Libraries : Routines

r0( )

NAME

r0( ) - return the contents of general register r0 (also r1-r15) (SH)

SYNOPSIS

int r0
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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( ).

NOTE SH770X

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.

RETURNS

The contents of register r0 (or the requested register).

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging


Libraries : Routines

gbr( )

NAME

gbr( ) - return the contents of the global base register (SH)

SYNOPSIS

int gbr
    (
    int taskId
    )

DESCRIPTION

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.

RETURNS

The contents of register gbr.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging


Libraries : Routines

vbr( )

NAME

vbr( ) - return the contents of the vector base register (SH)

SYNOPSIS

int vbr
    (
    int taskId
    )

DESCRIPTION

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.

RETURNS

The contents of register vbr.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging


Libraries : Routines

mach( )

NAME

mach( ) - return the contents of system register mach (SH)

SYNOPSIS

int mach
    (
    int taskId /* task ID, 0 means default task */
    )

DESCRIPTION

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.

RETURNS

The contents of register mach.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging


Libraries : Routines

macl( )

NAME

macl( ) - return the contents of system register macl (SH)

SYNOPSIS

int macl
    (
    int taskId
    )

DESCRIPTION

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.

RETURNS

The contents of register macl.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging


Libraries : Routines

pr( )

NAME

pr( ) - return the contents of system register pr (SH)

SYNOPSIS

int pr
    (
    int taskId
    )

DESCRIPTION

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.

RETURNS

The contents of register pr.

SEE ALSO

dbgArchLib, VxWorks Programmer's Guide: Debugging