Get information about traceparser
#include <sys/traceparser.h> void * traceparser_get_info ( struct traceparser_state * stateptr, info_modes_t infomodes, unsigned * len );
libtraceparser
The traceparser_get_info() function gets information related to the state of the traceparser. The infomodes argument may be any of the constants shown below and are defined in traceparser.h.
The len argument is a pointer to the size of the return buffer. When specified, its contents are changed to indicate the size of the return. This is primarily for the _TRACEPARSER_SYSPAGE and _TRACEPARSER_HEADER_KEYWORDS modes but it'll work for all the modes. For most of the modes, len may be NULL.
The stateptr is an opaque structure obtained from traceparser_init().
The following are valid user info modes; see the list below for others.
Value for info_modes and Pointer to return data type, cast as void |
Description |
---|---|
_TRACEPARSER__INFO_SYSPAGE syspage_entry |
Returns a pointer to the syspage entry. |
_TRACEPARSER_INFO_ENDIAN_CONV unsigned |
Returns a dereferenced pointer; 1 if the endian conversion has been applied, 0 if no conversion has been performed. |
_TRACEPARSER_INFO_NOW_CALLBACK_CLASS, _TRACEPARSER_INFO_NOW_CALLBACK_EVENT unsigned |
Returns the class or event numerical value of the currently executed callback function. The numerical values are considered opaque and should be used only for other traceparser functions. |
_TRACEPARSER_INFO_PREV_CALLBACK_CLASS _TRACEPARSER_INFO_PREV_CALLBACK_EVENT unsigned |
As above, but returns the class or event numerical value of the previously executed callback function. |
_TRACEPARSER_INFO_PREV_CALLBACK_RETURN int |
Returns the value of the previously executed callback function. |
_TRACEPARSER_INFO_DEBUG unsigned |
Returns the debug category. |
_TRACEPARSER_INFO_ERROR unsigned |
Returns the traceparser error level. It must be used to determine traceparser library related errors. (See sys/traceparser.h for a list of the returned error values.) |
The following modes return a pointer to the header field of the buffer. All data types are void.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | No |
traceparser_get_info(), traceparser_init()