Go to main content

man pages section 3: Extended Library Functions, Volume 3

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

Paddr_to_loadobj (3PROC)

Name

Paddr_to_loadobj, Pname_to_loadobj - map a process address or object name to an rtld load object

Synopsis

#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)

Description

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.

Return Values

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.

Errors

On failure, this errno value may be set:

ENODATA

No object mapping was found

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Unsafe

See Also

libproc(3LIB), libproc.h(3HEAD), Pcreate(3PROC), Pgrab(3PROC), rtld_db(3EXT)