'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .TH ps_pread 3PROC "12 Oct 2007" "SunOS 5.11" "Process Control Library Functions" .SH NAME ps_pread, ps_pwrite, ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite \- interfaces in libthread_db that target process memory access .SH SYNOPSIS .LP .nf #include \fBps_err_e\fR \fBps_pread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR, \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR); .fi .LP .nf \fBps_err_e\fR \fBps_pwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR, \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR); .fi .LP .nf \fBps_err_e\fR \fBps_pdread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR, \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR); .fi .LP .nf \fBps_err_e\fR \fBps_pdwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR, \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR); .fi .LP .nf \fBps_err_e\fR \fBps_ptread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR, \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR); .fi .LP .nf \fBps_err_e\fR \fBps_ptwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR, \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR); .fi .SH DESCRIPTION .sp .LP These routines copy data between the target process's address space and the controlling process. \fBps_pread()\fR copies \fIsize\fR bytes from address \fIaddr\fR in the target process into \fIbuf\fR in the controlling process. \fBpr_pwrite()\fR is like \fBps_pread()\fR except that the direction of the copy is reversed; data is copied from the controlling process to the target process. .sp .LP \fBps_pdread()\fR and \fBps_ptread()\fR behave identically to \fBps_pread()\fR. \fBps_pdwrite()\fR and \fBps_ptwrite()\fR behave identically to \fBps_pwrite()\fR. These functions can be implemented as simple aliases for the corresponding primary functions. They are artifacts of history that must be maintained. .SH RETURN VALUES .sp .ne 2 .mk .na \fB\fBPS_OK\fR\fR .ad .RS 14n .rt The call returned successfully. \fIsize\fR bytes were copied. .RE .sp .ne 2 .mk .na \fB\fBPS_BADADDR\fR\fR .ad .RS 14n .rt Some part of the address range from \fIaddr\fR through \fIaddr\fR+\fIsize\fR\(mi\fB1\fR is not part of the target process's address space. .RE .sp .ne 2 .mk .na \fB\fBPS_ERR\fR\fR .ad .RS 14n .rt The function did not return successfully. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for description of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT LevelSafe .TE .SH SEE ALSO .sp .LP \fBlibc_db\fR(3LIB), \fBlibrtld_db\fR(3LIB), \fBproc_service\fR(3PROC), \fBrtld_db\fR(3EXT), \fBattributes\fR(5), \fBthreads\fR(5)