Ddpi_Error APIs
Ddpi_Error APIs provide a consistent
method of detecting and setting error conditions.
A Ddpi_Error object
is created in response to an error condition generated by a producer or consumer
application. Most ddpi operations take a Ddpi_Error object
as a parameter. The exceptions are the utility operations and some flag-setting ddpi format
operations.
When a call to a ddpi operation returns
a value of DW_DLV_ERROR, an error has occurred. Error codes are set within
the Ddpi_Error object to notify the program analysis application
of the error condition. To extract error information from the error object,
the program analysis application needs to contain error-handling callback
functions.
If the Ddpi_Error object indicates
that the error condition was triggered by a call to a libdwarf operation,
the program analysis application can extract further information by querying
the Dwarf_Error object that is stored in the Ddpi_Access
object. For more information, see Ddpi_Access APIs.
If invalid arguments are specified when a ddpi operation
is called, the return values are undefined. Because the return values specify
the error-handling callback function to be called, the ddpi operation
might terminate abnormally.
- A NULL pointer to a
ddpioperation (except where explicitly permitted). - A pointer to an invalid address.
- A pointer to an uninitialized value.