Sun Studio 12 Update 1: Debugging a Program With dbx

Variables Valid for when Command and Specific Events

Certain variables are valid only within the body of a when command and for specific events as shown in the following tables.

Table B–1 Variables Valid for sig Event

Variable  

Description  

$sig

Signal number that caused the event 

$sigstr

Name of $sig

$sigcode

Subcode of $sig if applicable

$sigcodestr

Name of $sigcode

$sigsender

Process ID of sender of the signal, if appropriate 

Table B–2 Variable Valid for exit Event

Variable  

Description  

$exitcode

Value of the argument passed to _exit(2) or exit(3) or the return value of main

Table B–3 Variable Valid for dlopen and dlclose Events

Variable 

Description 

$dlobj

Pathname of the load object dlopened or dlclosed 

Table B–4 Variables Valid for sysin and sysout Events

Variable 

Description 

$syscode

System call number 

$sysname

System call name 

Table B–5 Variable Valid for proc_gone Events

Variable 

Description 

$reason

One of signal, exit, kill, or detach 

Table B–6 Variables Valid for thr_create Event

Variable 

Description 

$newthread

Id of the newly created thread (for example, t@5)

$newlwp

Id of the newly created LWP (for example, l@4)

Table B–7 Variables Valid for watch Event

Variable 

Description 

$watchaddr

The address being written to, read from, or executed 

$watchmode

One of the following: r for read, w for write, x for execute; followed by one of the following: a for after, b for before