HP-UX Reference (11i v2 07/12) - 3 Library Functions N-Z (vol 7)

u
uwx_register_callbacks(3X) uwx_register_callbacks(3X)
(Integrity Systems Only)
UWX_KEY_LINENUM
Source line number within the source file corresponding to the IP.
UWX_KEY_INLINE
An inline context identifier for use in stepping through inlined calls (if the current context is in
an inlined call).
In all cases when the callback returns a pointer to a string, the unwind engine copies the string into a
string pool within the unwind environment. The client may deallocate or reuse its string storage after the
UWX_LKUP_FREE
request.
The Copy-In Callback
The copy-in callback is used for obtaining values from the address space of the process being unwound. Its
prototype is given in
<uwx.h> as follows:
typedef int (*copyin_cb)(
int
request,
char *
loc,
uint64_t
rem,
int
len,
intptr_t
tok
);
The unwind engine passes the following parameters to the callback routine:
request Identifies the type of request that the unwind engine is making.
loc Address in local memory where the requested data should be placed. This address will
always be properly aligned for an object of the requested length.
rem Address in remote memory from which remote data should be read, or the identifier of a
register to be read from the context of the target process.
len Number of bytes to read from the target address space. For UWX_COPYIN_UINFO
requests, it will always be either 4 or 8; for all other requests, it will always be 8.
tok The callback token.
The unwind engine uses this callback for four types of requests:
UWX_COPYIN_UINFO
Read data from the unwind information area of the target process. Since this area is in the text
segment, a debugger may choose to read this information directly from the file or from a copy in
local memory instead of from the target process.
UWX_COPYIN_MSTACK
Read data from the memory stack of the target process.
UWX_COPYIN_RSTACK
Read data from the register stack backing store of the target process. Special considerations
may be necessary for portions of the backing store. (For example, on HP-UX, reading from an
area between BSP and BSPSTORE using either ttrace() or the uc_access library requires
a special request type.)
UWX_COPYIN_REG
Read data from a register in the current process context. If unwinding was initiated or resumed
from a signal context record, this request should read data from the signal context record.
For all but UWX_COPYIN_REG requests, the rem parameter contains the address in remote memory from
which data should be read. This address will always be properly aligned for an object of the requested
length.
For UWX_COPYIN_REG requests, the rem parameter contains the register identifier of the register whose
value is needed. The register identifier will be one of the following:
UWX_REG_PREDS predicates (PR0-PR63)
UWX_REG_AR_RNAT ar.rnat
UWX_REG_AR_UNAT ar.unat
HP-UX 11i Version 2: December 2007 Update 4 Hewlett-Packard Company 603