1proc_service(3PROC) Process Control Library Functions proc_service(3PROC)
2
3
4
6 proc_service - process service interfaces
7
9 #include <proc_service.h>
10
11 ps_err_e ps_pdmodel(struct ps_prochandle *ph,
12 int *data_model);
13
14
15 ps_err_e ps_pglobal_lookup(struct ps_prochandle *ph,
16 const char *object_name, const char *sym_name,
17 psaddr_t *sym_addr);
18
19
20 ps_err_e ps_pglobal_sym(struct ps_prochandle *ph,
21 const char *object_name, const char *sym_name,
22 ps_sym_t *sym);
23
24
25 ps_err_e ps_pread(struct ps_prochandle *ph, psaddr_t addr,
26 void *buf, size_t size);
27
28
29 ps_err_e ps_pwrite(struct ps_prochandle *ph, psaddr_t addr,
30 const void *buf, size_t size);
31
32
33 ps_err_e ps_pdread(struct ps_prochandle *ph, psaddr_t addr,
34 void *buf, size_t size);
35
36
37 ps_err_e ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr,
38 const void *buf, size_t size);
39
40
41 ps_err_e ps_ptread(struct ps_prochandle *ph, psaddr_t addr,
42 void *buf, size_t size);
43
44
45 ps_err_e ps_ptwrite(struct ps_prochandle *ph, psaddr_t addr,
46 const void *buf, size_t size);
47
48
49 ps_err_e ps_pstop(struct ps_prochandle *ph);
50
51
52 ps_err_e ps_pcontinue(struct ps_prochandle *ph);
53
54
55 ps_err_e ps_lstop(struct ps_prochandle *ph, lwpid_t lwpid);
56
57
58 ps_err_e ps_lcontinue(struct ps_prochandle *ph, lwpid_t lwpid);
59
60
61 ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lwpid,
62 prgregset_t gregset);
63
64
65 ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lwpid,
66 const prgregset_t gregset);
67
68
69 ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lwpid,
70 prfpregset_t *fpregset);
71
72
73 ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lwpid,
74 const prfpregset_t *fpregset);
75
76
77 ps_err_e ps_pauxv(struct ps_prochandle *ph,
78 const auxv_t **auxp);
79
80
81 ps_err_e ps_kill(struct ps_prochandle *ph, int sig);
82
83
84 ps_err_e ps_lrolltoaddr(struct ps_prochandle *ph,
85 lwpid_t lwpid, psaddr_t go_addr, psaddr_t stop_addr);
86
87
88 void ps_plog(const char *fmt);
89
90
91 SPARC
92 ps_err_e ps_lgetxregsize(struct ps_prochandle *ph,
93 lwpid_t lwpid, int *xregsize);
94
95
96 ps_err_e ps_lgetxregs(struct ps_prochandle *ph,
97 lwpid_t lwpid, caddr_t xregset);
98
99
100 ps_err_e ps_lsetxregs(struct ps_prochandle *ph,
101 lwpid_t lwpid, caddr_t xregset);
102
103
104 x86
105 ps_err_e ps_lgetLDT(struct ps_prochandle *ph, lwpid_t lwpid,
106 struct ssd *ldt);
107
108
110 Every program that links libthread_db or librtld_db must provide a set
111 of process control primitives that allow libthread_db and librtld_db to
112 access memory and registers in the target process, to start and to stop
113 the target process, and to look up symbols in the target process. See
114 libc_db(3LIB). For information on librtld_db, refer to the Linker and
115 Libraries Guide.
116
117
118 Refer to the individual reference manual pages that describe these rou‐
119 tines for a functional specification that clients of libthread_db and
120 librtld_db can use to implement this required interface. The <proc_ser‐
121 vice.h> header lists the C declarations of these routines.
122
124 ps_pdmodel() Returns the data model of the target process.
125
126
127 ps_pglobal_lookup() Looks up the symbol in the symbol table of the
128 load object in the target process and returns
129 its address.
130
131
132 ps_pglobal_sym() Looks up the symbol in the symbol table of the
133 load object in the target process and returns
134 its symbol table entry.
135
136
137 ps_pread() Copies size bytes from the target process to the
138 controlling process.
139
140
141 ps_pwrite() Copies size bytes from the controlling process
142 to the target process.
143
144
145 ps_pdread() Identical to ps_pread().
146
147
148 ps_pdwrite() Identical to ps_pwrite().
149
150
151 ps_ptread() Identical to ps_pread().
152
153
154 ps_ptwrite() Identical to ps_pwrite().
155
156
157 ps_pstop() Stops the target process.
158
159
160 ps_pcontinue() Resumes target process.
161
162
163 ps_lstop() Stops a single lightweight process ( LWP )
164 within the target process.
165
166
167 ps_lcontinue() Resumes a single LWP within the target process.
168
169
170 ps_lgetregs() Gets the general registers of the LWP.
171
172
173 ps_lsetregs() Sets the general registers of the LWP.
174
175
176 ps_lgetfpregs() Gets the LWP`s floating point register set.
177
178
179 ps_lsetfpregs() Sets the LWP`s floating point register set.
180
181
182 ps_pauxv() Returns a pointer to a read-only copy of the
183 target process's auxiliary vector.
184
185
186 ps_kill() Sends signal to target process.
187
188
189 ps_lrolltoaddr() Rolls the LWP out of a critical section when the
190 process is stopped.
191
192
193 ps_plog() Logs a message.
194
195
196 SPARC
197 ps_lgetxregsize() Returns the size of the architecture-dependent
198 extra state registers.
199
200
201 ps_lgetxregs() Gets the extra state registers of the LWP.
202
203
204 ps_lsetxregs() Sets the extra state registers of the LWP.
205
206
207 x86
208 ps_lgetLDT() Reads the local descriptor table of the LWP.
209
210
212 See attributes(5) for description of the following attributes:
213
214
215
216
217 ┌─────────────────────────────┬─────────────────────────────┐
218 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
219 ├─────────────────────────────┼─────────────────────────────┤
220 │MT Level │Safe │
221 └─────────────────────────────┴─────────────────────────────┘
222
224 libc_db(3LIB), librtld_db(3LIB), ps_pread(3PROC), rtld_db(3EXT),
225 attributes(5)
226
227
228 Linker and Libraries Guide
229
230
231
232SunOS 5.11 12 Oct 2007 proc_service(3PROC)