Linker and Libraries Guide

Error Handling

The following error states can be returned by the rtld-debugger interface (defined in rtld_db.h):


typedef enum {
        RD_ERR,
        RD_OK,
        RD_NOCAPAB,
        RD_DBERR,
        RD_NOBASE,
        RD_NODYNAM,
        RD_NOMAPS
} rd_err_e;

The following interfaces can be used to gather the error information:


char * rd_errstr(rd_err_e rderr);
rd_errstr()

This function returns a descriptive error string describing the error code rderr.


void rd_log(const int onoff);
rd_log()

This function turns logging on (1) or off (0). When logging is turned on, the imported interface function ps_plog() provided by the controlling process, is called with more detailed diagnostic information.