ps_pdread(3T)
NAME
ps_pdread, ps_ptread, ps_pdwrite, ps_ptwrite − interfaces in libthread_db that target process memory access
SYNOPSIS
#include <proc_service.h>
ps_err_e ps_pdread(const struct ps_prochandle ∗ph,
psaddr_t addr, char ∗buf, int size)
ps _err_e ps_ptread(const struct ps_prochandle ∗ph,
psaddr_t addr, char ∗buf, int size)
ps _err_e ps_pdwrite(const struct ps_prochandle ∗ph,
psaddr_t addr, char ∗buf, int size)
ps _err_e ps_ptwrite(const struct ps_prochandle ∗ph,
psaddr_t addr, char ∗buf, int size)
DESCRIPTION
These routines copy data between the target process’s address space and the controlling process. pdread and ptread copy size bytes from address addr in the target process into buf in the controlling process. In pdread, addr refers to an address in the target process’s data segment. In ptread, addr refers to an address in the target process’s text segment. On architectures where text and data share an address space, it is permissible for pdread and ptread to be identical. pdwrite and ptwrite are just like pdread and ptread, respectively, except that the direction of the copy is reversed. Data is copied from the controlling process to the target process.
RETURN VALUES
PS_OK The call returned successfully. size bytes were copied.
PS_BADADDR
The address range from addr through addr+size-1, is not part of the target process’s address space.
PS_ERR The function did not return successfully.
ATTRIBUTES
See attributes(5) for description of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| MT Level | Safe |
SEE ALSO
libthread(3T), libthread_db(3T), proc_service(3T), libthread_db(4), attributes(5)
SunOS 5.6 — Last change: 1 Jun 1996