Paddr_to_loadobj, Pname_to_loadobj - map a process address or object name to an rtld load object
#include <rtld_db.h> #include <libproc.h>
const rd_loadobj_t *Paddr_to_loadobj(ps_prochandle_t *Pr, uintptr_t addr)
const rd_loadobj_t *Pname_to_loadobj(ps_prochandle_t *Pr, const char *name)
The Pr argument identifies a victim process or core file attached to the controlling process by the create and grab interfaces. For more information, see the Pcreate(3PROC) and Pgrab(3PROC) man pages.
The Paddr_to_loadobj() function retrieves the dynamic linker's load object structure corresponding to the virtual address of the victim process specified by the addr argument.
The Pname_to_loadobj() function retrieves the load object structure of the dynamic linker corresponding to the dynamic object named by the name argument in the victim process. For example, the libc.so library.
On successful completion, the Paddr_to_loadobj() and Pname_to_loadobj() functions return a pointer to an rtld load object. On error, they return NULL and set errno to indicate the error. For more information, see the rtld_db(3EXT) man page.
On failure, this errno value may be set:
No object mapping was found
See attributes(7) for descriptions of the following attributes:
|
libproc(3LIB), libproc.h(3HEAD), Pcreate(3PROC), Pgrab(3PROC), rtld_db(3EXT)