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_LKUP_UTABLE
A load module was found. The result vector contains load module and unwind table information.
UWX_LKUP_NOTFOUND
No information found for this IP.
UWX_LKUP_ERR
An error occurred.
In the normal case, the callback obtains the following information about the given IP: base address of its
text segment, starting and ending addresses of the unwind table, and (optional) unwind flags. It places this
information in the result vector, and returns the
UWX_LKUP_UTABLE status code.
The result vector is an array of key/value pairs. The first value in each pair is a key, and the second value
in each pair is a corresponding value. The vector is terminated by a key/value pair whose key is 0.
The following keys can be returned in the result vector:
UWX_KEY_TBASE Base address of text segment.
UWX_KEY_USTART
Starting address of unwind table.
UWX_KEY_UEND Ending address of unwind table.
UWX_KEY_UFLAGS Unwind flags (HP-UX only).
UWX_KEY_GP Value of the gp register for this load module.
On HP-UX, the load information can be obtained with the dlmodinfo() and dlgetname() routines.
The dlmodinfo() routine returns a descriptor containing the base address of the text segment and the
address of the unwind header, and the dlgetname() routine returns the name of that load module. The
unwind header contains the unwind flags, and the segment-relative offsets of the beginning and end of the
unwind table. The callback must convert the segment-relative offsets to virtual addresses by adding the
base address of the text segment. The unwind flags contain a version number of the unwind table format,
and a flag that indicates whether the unwind table contains 32-bit or 64-bit entries. (On other operating
systems, unwind tables always contain 64-bit entries, so the unwind flags do not need to be provided.)
If the callback does not find any information it returns the UWX_LKUP_NOTFOUND
status code. It should
leave the resultp parameter unmodified.
When the callback returns
UWX_LKUP_NOTFOUND
, the unwind engine will assume that the IP belongs to
a leaf procedure with default unwind properties, and will attempt to unwind accordingly.
If any error condition occurs that would prevent the unwind engine from unwinding correctly, the callback
should return
UWX_LKUP_ERR and leave the resultp parameter unmodified.
In response to the UWX_LKUP_SYMBOLS
or UWX_LKUP_MODULE request, the callback must return one
of the following status codes:
UWX_LKUP_SYMINFO
Symbolic information was found for this IP.
UWX_LKUP_NOTFOUND
No symbolic information found for this IP.
UWX_LKUP_ERR
An error occurred.
When returning with UWX_LKUP_SYMINFO status, the result vector can contain the following keys:
UWX_KEY_MODULE
Pointer to name of the load module containing the IP.
UWX_KEY_FUNC
Pointer to name of the function containing the IP.
UWX_KEY_FUNCSTART
Address of the start of function containing the IP.
UWX_KEY_INLINED_FUNC
Pointer to name of an inlined function name (if the current context is in an inlined call).
UWX_KEY_SRCFILE
Pointer to name of the source file containing the current function.
602 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: December 2007 Update