Unleashed v1.4
[unleashed.git] / share / man / man3proc / ps_pread.3proc
blob25bae238b709c17a532ab363028b1c654be20926
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PS_PREAD 3PROC "Oct 12, 2007"
7 .SH NAME
8 ps_pread, ps_pwrite, ps_pdread, ps_pdwrite, ps_ptread, ps_ptwrite \- interfaces
9 in libthread_db that target process memory access
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <proc_service.h>
15 \fBps_err_e\fR \fBps_pread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
16      \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
17 .fi
19 .LP
20 .nf
21 \fBps_err_e\fR \fBps_pwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
22      \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
23 .fi
25 .LP
26 .nf
27 \fBps_err_e\fR \fBps_pdread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
28      \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
29 .fi
31 .LP
32 .nf
33 \fBps_err_e\fR \fBps_pdwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
34      \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
35 .fi
37 .LP
38 .nf
39 \fBps_err_e\fR \fBps_ptread\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
40      \fBvoid *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
41 .fi
43 .LP
44 .nf
45 \fBps_err_e\fR \fBps_ptwrite\fR(\fBstruct ps_prochandle *\fR\fIph\fR, \fBpsaddr_t\fR \fIaddr\fR,
46      \fBconst void *\fR\fIbuf\fR, \fBsize_t\fR \fIsize\fR);
47 .fi
49 .SH DESCRIPTION
50 .LP
51 These routines copy data between the address space of the target process
52 and the controlling process. \fBps_pread()\fR copies \fIsize\fR bytes from
53 address \fIaddr\fR in the target process into \fIbuf\fR in the controlling
54 process. \fBpr_pwrite()\fR is like \fBps_pread()\fR except that the
55 direction of the copy is reversed; data is copied from the controlling
56 process to the target process.
57 .sp
58 .LP
59 \fBps_pdread()\fR and \fBps_ptread()\fR behave identically to \fBps_pread()\fR.
60 \fBps_pdwrite()\fR and \fBps_ptwrite()\fR behave identically to
61 \fBps_pwrite()\fR. These functions can be implemented as simple aliases for the
62 corresponding primary functions. They are artifacts of history that must be
63 maintained.
64 .SH RETURN VALUES
65 .ne 2
66 .na
67 \fB\fBPS_OK\fR\fR
68 .ad
69 .RS 14n
70 The call returned successfully. \fIsize\fR bytes were copied.
71 .RE
73 .sp
74 .ne 2
75 .na
76 \fB\fBPS_BADADDR\fR\fR
77 .ad
78 .RS 14n
79 Some part of the address range from \fIaddr\fR through
80 \fIaddr\fR+\fIsize\fR\(mi\fB1\fR is not part of the address space of the
81 target process.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fBPS_ERR\fR\fR
88 .ad
89 .RS 14n
90 The function did not return successfully.
91 .RE
93 .SH ATTRIBUTES
94 .LP
95 See \fBattributes\fR(5) for description of the following attributes:
96 .sp
98 .sp
99 .TS
100 box;
101 c | c
102 l | l .
103 ATTRIBUTE TYPE  ATTRIBUTE VALUE
105 MT Level        Safe
108 .SH SEE ALSO
110 \fBlibc_db\fR(3LIB), \fBlibrtld_db\fR(3LIB), \fBproc_service\fR(3PROC),
111 \fBrtld_db\fR(3EXT), \fBattributes\fR(5), \fBthreads\fR(5)