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)
typedef int (*
lookupip_cb)(
int
request,
uint64_t
ip,
intptr_t
tok,
uint64_t **
resultp
);
The unwind engine passes the following parameters to the callback routine:
request Identifies the type of request that the unwind engine is making.
ip The IP for which information is needed.
tok The callback token.
resultp Address of a result vector pointer.
The unwind engine uses this callback for four types of requests:
UWX_LKUP_LOOKUP
Requests the callback to lookup information for the given IP. The callback must allocate a result
vector, place the load information in the vector, and return a pointer to the result vector in
(*resultp) .
UWX_LKUP_FREE
Informs the callback when it is safe to free the result vector. A pointer to the vector returned by
the lookup request is passed in (*resultp). The ip parameter is not used for this request. (If the
result vector was not dynamically allocated, this request can be ignored.)
UWX_LKUP_SYMBOLS
Requests the callback to return symbolic information for the IP. If symbolic information is avail-
able, the callback must allocate a result vector, place the symbolic information in the vector, and
return a pointer to the result vector in (*resultp) .
UWX_LKUP_MODULE
Requests the callback to return the name of the module containing the IP. If the module name is
available, the callback must allocate a result vector, place the module name in the vector, and
return a pointer to the result vector in (*resultp) .
In order to step from one frame to a previous frame on the stack, libuwx starts with the current IP and
makes a
UWX_LKUP_LOOKUP
request to obtain information about this IP. The UWX_LKUP_SYMBOLS
and UWX_LKUP_MODULE
requests are used only if the client makes a specific request for symbolic infor-
mation that is not already available for the current frame.
The
*resultp parameter is both an input and an output parameter to the lookup-ip callback routine. As
an input parameter, it points to an array of key/value pairs of unsigned 64-bit integers. 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 vector may contain the following keys:
UWX_KEY_VERSION
Version number of the current callback interface. The value corresponding to this key is
currently 3. This version number changes only when the callback interface adds new features
that a client may wish to check for.
UWX_KEY_PREDS
Current value of the predicate registers. This is provided only for UWX_LKUP_LOOKUP
requests, and only if the predicates are currently known.
UWX_KEY_FUNCSTART
Starting address of the current function. This is provided only for UWX_LKUP_MODULE and
UWX_LKUP_SYMBOLS requests, and only if the starting address of the function is currently
available. (This value can assist the callback routine in locating the proper symbol name.)
UWX_KEY_INLINE
An inline context identifier. This is provided only for UWX_LKUP_SYMBOLS requests in
response to a call to the uwx_step_inline() entry point. See uwx_step_inline(3X) and
uwx_find_source_info(3X) for more information about stepping over inlined calls.
In response to the
UWX_LKUP_LOOKUP request, the callback must return one of the following status
codes:
HP-UX 11i Version 2: December 2007 Update − 2 − Hewlett-Packard Company 601