Print this page
3946 ::gcore
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libproc/common/llib-lproc
+++ new/usr/src/lib/libproc/common/llib-lproc
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /* LINTLIBRARY */
22 22 /* PROTOLIB1 */
23 23
24 24 /*
25 25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 26 * Use is subject to license terms.
27 27 */
28 +/*
29 + * Copyright (c) 2013 by Delphix. All rights reserved.
30 + */
28 31 #include "libproc.h"
29 32
30 33 /*
31 34 * usr/src/lib/libproc
32 35 */
33 36
34 37 /* Pcontrol.c */
35 38 int _libproc_debug;
36 39 struct ps_prochandle *Pcreate(const char *file, char *const *argv,
37 40 int *perr, char *path, size_t len);
38 41 const char *Pcreate_error(int error);
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
39 42 void Pcreate_callback(struct ps_prochandle *Pr);
40 43 struct ps_prochandle *Pgrab(pid_t pid, int gflag, int *perr);
41 44 const char *Pgrab_error(int error);
42 45 void Pfree(struct ps_prochandle *Pr);
43 46 int Pstate(struct ps_prochandle *Pr);
44 47 int Pasfd(struct ps_prochandle *Pr);
45 48 int Pctlfd(struct ps_prochandle *Pr);
46 49 const psinfo_t *Ppsinfo(struct ps_prochandle *Pr);
47 50 const pstatus_t *Pstatus(struct ps_prochandle *Pr);
48 51 int Pcred(struct ps_prochandle *Pr, prcred_t *pcrp, int ngroups);
49 -ssize_t Ppriv(struct ps_prochandle *Pr, prpriv_t *pprivp, size_t);
52 +int Ppriv(struct ps_prochandle *Pr, prpriv_t **pprivp);
50 53 void Psync(struct ps_prochandle *Pr);
51 54 int Pcreate_agent(struct ps_prochandle *Pr);
52 55 void Pdestroy_agent(struct ps_prochandle *Pr);
53 56 int Preopen(struct ps_prochandle *Pr);
54 57 void Prelease(struct ps_prochandle *Pr, int flags);
55 58 int Pstopstatus(struct ps_prochandle *Pr, long cmd, uint_t msec);
56 59 int Pwait(struct ps_prochandle *Pr, uint_t msec);
57 60 int Pstop(struct ps_prochandle *Pr, uint_t msec);
58 61 int Pdstop(struct ps_prochandle *Pr);
59 62 int Pgetareg(struct ps_prochandle *Pr, int regno, prgreg_t *preg);
60 63 int Pputareg(struct ps_prochandle *Pr, int regno, prgreg_t reg);
61 64 int Psetrun(struct ps_prochandle *Pr, int sig, int flags);
62 65 ssize_t Pread(struct ps_prochandle *Pr,
63 66 void *buf, size_t nbyte, uintptr_t address);
64 67 ssize_t Pread_string(struct ps_prochandle *Pr,
65 68 char *buf, size_t nbyte, uintptr_t address);
66 69 ssize_t Pwrite(struct ps_prochandle *Pr,
67 70 const void *buf, size_t nbyte, uintptr_t address);
68 71 int Pclearsig(struct ps_prochandle *Pr);
69 72 int Pclearfault(struct ps_prochandle *Pr);
70 73 int Psetbkpt(struct ps_prochandle *Pr, uintptr_t address, ulong_t *saved);
71 74 int Pdelbkpt(struct ps_prochandle *Pr, uintptr_t address, ulong_t saved);
72 75 int Pxecbkpt(struct ps_prochandle *Pr, ulong_t saved);
73 76 int Psetwapt(struct ps_prochandle *Pr, const prwatch_t *wp);
74 77 int Pdelwapt(struct ps_prochandle *Pr, const prwatch_t *wp);
75 78 int Pxecwapt(struct ps_prochandle *Pr, const prwatch_t *wp);
76 79 int Psetflags(struct ps_prochandle *Pr, long flags);
77 80 int Punsetflags(struct ps_prochandle *Pr, long flags);
78 81 int Psignal(struct ps_prochandle *Pr, int which, int stop);
79 82 void Psetsignal(struct ps_prochandle *Pr, const sigset_t *set);
80 83 int Pfault(struct ps_prochandle *Pr, int which, int stop);
81 84 void Psetfault(struct ps_prochandle *Pr, const fltset_t *set);
82 85 int Psysentry(struct ps_prochandle *Pr, int which, int stop);
83 86 void Psetsysentry(struct ps_prochandle *Pr, const sysset_t *set);
84 87 int Psysexit(struct ps_prochandle *Pr, int which, int stop);
85 88 void Psetsysexit(struct ps_prochandle *Pr, const sysset_t *set);
86 89 int Plwp_iter(struct ps_prochandle *Pr, proc_lwp_f *func, void *cd);
87 90 int Psyscall(struct ps_prochandle *Pr, sysret_t *,
88 91 int sysindex, uint_t nargs, argdes_t *argp);
89 92
90 93 struct ps_lwphandle *Lgrab(struct ps_prochandle *P, lwpid_t lwpid, int *perr);
91 94 const char *Lgrab_error(int error);
92 95 struct ps_prochandle *Lprochandle(struct ps_lwphandle *Lwp);
93 96 void Lfree(struct ps_lwphandle *Lwp);
94 97 int Lctlfd(struct ps_lwphandle *Lwp);
95 98 int Lwait(struct ps_lwphandle *Lwp, uint_t msec);
96 99 int Lstop(struct ps_lwphandle *Lwp, uint_t msec);
97 100 int Ldstop(struct ps_lwphandle *Lwp);
98 101 int Lstate(struct ps_lwphandle *Lwp);
99 102 const lwpsinfo_t *Lpsinfo(struct ps_lwphandle *Lwp);
100 103 const lwpstatus_t *Lstatus(struct ps_lwphandle *Lwp);
101 104 int Lgetareg(struct ps_lwphandle *Lwp, int regno, prgreg_t *preg);
102 105 int Lputareg(struct ps_lwphandle *Lwp, int regno, prgreg_t reg);
103 106 int Lsetrun(struct ps_lwphandle *Lwp, int sig, int flags);
104 107 int Lclearsig(struct ps_lwphandle *Lwp);
105 108 int Lclearfault(struct ps_lwphandle *Lwp);
106 109 int Lxecbkpt(struct ps_lwphandle *Lwp, ulong_t saved);
107 110 int Lxecwapt(struct ps_lwphandle *Lwp, const prwatch_t *wp);
108 111 void Lsync(struct ps_lwphandle *Lwp);
109 112
110 113 /* Plwpregs.c */
111 114 int Plwp_getregs(struct ps_prochandle *Pr, lwpid_t i, prgregset_t gr);
112 115 int Plwp_setregs(struct ps_prochandle *Pr, lwpid_t i, const prgregset_t gr);
113 116 int Plwp_getfpregs(struct ps_prochandle *Pr, lwpid_t i, prfpregset_t *fp);
114 117 int Plwp_setfpregs(struct ps_prochandle *Pr, lwpid_t i, const prfpregset_t *fp);
115 118 #if defined(sparc) || defined(__sparc)
116 119 int Plwp_getxregs(struct ps_prochandle *Pr, lwpid_t i, prxregset_t *xr);
117 120 int Plwp_setxregs(struct ps_prochandle *Pr, lwpid_t i, const prxregset_t *xr);
118 121 #if defined(__sparcv9)
119 122 int Plwp_getasrs(struct ps_prochandle *Pr, lwpid_t i, asrset_t asrs);
120 123 int Plwp_setasrs(struct ps_prochandle *Pr, lwpid_t i, const asrset_t asrs);
121 124 #endif /* __sparcv9 */
122 125 #endif /* __sparc */
123 126 int Plwp_getpsinfo(struct ps_prochandle *Pr, lwpid_t i, lwpsinfo_t *lps);
124 127
125 128 /* Pcore.c */
126 129 struct ps_prochandle *Pfgrab_core(int fd, const char *aout, int *perr);
127 130 struct ps_prochandle *Pgrab_core(const char *core, const char *aout,
128 131 int gflag, int *perr);
129 132
130 133 /* Pisprocdir.c */
131 134 int Pisprocdir(struct ps_prochandle *Pr, const char *dir);
132 135
133 136 /* Pservice.c */
134 137 ps_err_e ps_pdmodel(struct ps_prochandle *Pr, int *modelp);
135 138 ps_err_e ps_pread(struct ps_prochandle *Pr,
136 139 psaddr_t addr, void *buf, size_t size);
137 140 ps_err_e ps_pwrite(struct ps_prochandle *Pr,
138 141 psaddr_t addr, const void *buf, size_t size);
139 142 ps_err_e ps_pdread(struct ps_prochandle *Pr,
140 143 psaddr_t addr, void *buf, size_t size);
141 144 ps_err_e ps_pdwrite(struct ps_prochandle *Pr,
142 145 psaddr_t addr, const void *buf, size_t size);
143 146 ps_err_e ps_ptread(struct ps_prochandle *Pr,
144 147 psaddr_t addr, void *buf, size_t size);
145 148 ps_err_e ps_ptwrite(struct ps_prochandle *Pr,
146 149 psaddr_t addr, const void *buf, size_t size);
147 150 ps_err_e ps_pstop(struct ps_prochandle *Pr);
148 151 ps_err_e ps_pcontinue(struct ps_prochandle *Pr);
149 152 ps_err_e ps_lstop(struct ps_prochandle *Pr, lwpid_t lwpid);
150 153 ps_err_e ps_lcontinue(struct ps_prochandle *Pr, lwpid_t lwpid);
151 154 ps_err_e ps_lgetregs(struct ps_prochandle *Pr,
152 155 lwpid_t lwpid, prgregset_t regs);
153 156 ps_err_e ps_lsetregs(struct ps_prochandle *Pr,
154 157 lwpid_t lwpid, const prgregset_t regs);
155 158 ps_err_e ps_lgetfpregs(struct ps_prochandle *Pr,
156 159 lwpid_t lwpid, prfpregset_t *regs);
157 160 ps_err_e ps_lsetfpregs(struct ps_prochandle *Pr,
158 161 lwpid_t lwpid, const prfpregset_t *regs);
159 162 #if defined(sparc) || defined(__sparc)
160 163 ps_err_e ps_lgetxregsize(struct ps_prochandle *Pr,
161 164 lwpid_t lwpid, int *xrsize);
162 165 ps_err_e ps_lgetxregs(struct ps_prochandle *Pr,
163 166 lwpid_t lwpid, caddr_t xregs);
164 167 ps_err_e ps_lsetxregs(struct ps_prochandle *Pr,
165 168 lwpid_t lwpid, caddr_t xregs);
166 169 #endif /* sparc */
167 170 #if defined(__i386) || defined(__amd64)
168 171 ps_err_e ps_lgetLDT(struct ps_prochandle *Pr,
169 172 lwpid_t lwpid, struct ssd *ldt);
170 173 #endif /* __i386 || __amd6464 */
171 174 void ps_plog(const char *fmt, ...);
172 175
173 176 /* Psymtab.c */
174 177 void Pupdate_maps(struct ps_prochandle *Pr);
175 178 void Pupdate_syms(struct ps_prochandle *Pr);
176 179 rd_agent_t *Prd_agent(struct ps_prochandle *Pr);
177 180 const prmap_t *Paddr_to_map(struct ps_prochandle *Pr, uintptr_t addr);
178 181 const prmap_t *Paddr_to_text_map(struct ps_prochandle *Pr, uintptr_t addr);
179 182 const prmap_t *Pname_to_map(struct ps_prochandle *Pr, const char *name);
180 183 const prmap_t *Plmid_to_map(struct ps_prochandle *Pr, Lmid_t lmid,
181 184 const char *name);
182 185 int Plookup_by_addr(struct ps_prochandle *Pr, uintptr_t addr,
183 186 char *sym_name_buffer, size_t bufsize, GElf_Sym *symbolp);
184 187 int Plookup_by_name(struct ps_prochandle *Pr,
185 188 const char *object_name, const char *symbol_name,
186 189 GElf_Sym *sym);
187 190 int Plookup_by_lmid(struct ps_prochandle *Pr,
188 191 Lmid_t lmid, const char *object_name, const char *symbol_name,
189 192 GElf_Sym *sym);
190 193 const rd_loadobj_t *Paddr_to_loadobj(struct ps_prochandle *, uintptr_t);
191 194 const rd_loadobj_t *Pname_to_loadobj(struct ps_prochandle *, const char *);
192 195 const rd_loadobj_t *Plmid_to_loadobj(struct ps_prochandle *, Lmid_t,
193 196 const char *);
194 197 int Pmapping_iter(struct ps_prochandle *Pr, proc_map_f *func, void *cd);
195 198 int Pmapping_iter_resolved(struct ps_prochandle *Pr, proc_map_f *func,
196 199 void *cd);
197 200 int Pobject_iter(struct ps_prochandle *Pr, proc_map_f *func, void *cd);
198 201 int Pobject_iter_resolved(struct ps_prochandle *Pr, proc_map_f *func,
199 202 void *cd);
200 203 char *Pobjname(struct ps_prochandle *Pr, uintptr_t addr,
201 204 char *buffer, size_t bufsize);
202 205 char *Pobjname_resolved(struct ps_prochandle *Pr, uintptr_t addr,
203 206 char *buffer, size_t bufsize);
204 207 int Plmid(struct ps_prochandle *Pr, uintptr_t addr, Lmid_t *lmidp);
205 208 int Psymbol_iter(struct ps_prochandle *Pr, const char *object_name,
206 209 int which, int type, proc_sym_f *func, void *cd);
207 210 int Psymbol_iter_by_lmid(struct ps_prochandle *Pr, Lmid_t lmid,
208 211 const char *object_name, int which, int type,
209 212 proc_sym_f *func, void *cd);
210 213 char *Pgetenv(struct ps_prochandle *Pr, const char *name,
211 214 char *buffer, size_t bufsize);
212 215 char *Pplatform(struct ps_prochandle *Pr, char *s, size_t n);
213 216 int Puname(struct ps_prochandle *Pr, struct utsname *u);
214 217 char *Pzonename(struct ps_prochandle *Pr, char *s, size_t n);
215 218 char *Pfindobj(struct ps_prochandle *Pr, const char *path,
216 219 char *s, size_t n);
217 220 char *Pexecname(struct ps_prochandle *Pr, char *buffer, size_t bufsize);
218 221 void Preset_maps(struct ps_prochandle *Pr);
219 222
220 223 ps_err_e ps_pglobal_lookup(struct ps_prochandle *Pr,
221 224 const char *object_name, const char *sym_name,
222 225 psaddr_t *sym_addr);
223 226
224 227 ps_err_e ps_pglobal_sym(struct ps_prochandle *Pr,
225 228 const char *object_name, const char *sym_name,
226 229 ps_sym_t *symp);
227 230
228 231 long Pgetauxval(struct ps_prochandle *Pr, int type);
229 232 const auxv_t *Pgetauxvec(struct ps_prochandle *Pr);
230 233 ps_err_e ps_pauxv(struct ps_prochandle *Pr, const auxv_t **aux);
231 234
232 235 /* Putil.c */
233 236 void Perror_printf(struct ps_prochandle *Pr, const char *format, ...);
234 237
235 238 /* pr_door.c */
236 239 int pr_door_info(struct ps_prochandle *Pr, int did, door_info_t *di);
237 240
238 241 /* pr_exit.c */
239 242 int pr_exit(struct ps_prochandle *Pr, int status);
240 243 int pr_lwp_exit(struct ps_prochandle *Pr);
241 244
242 245 /* pr_fcntl.c */
243 246 int pr_fcntl(struct ps_prochandle *Pr, int fd, int cmd, void *argp);
244 247
245 248 /* pr_getitimer.c */
246 249 int pr_getitimer(struct ps_prochandle *Pr,
247 250 int which, struct itimerval *itv);
248 251 int pr_setitimer(struct ps_prochandle *Pr,
249 252 int which, const struct itimerval *itv, struct itimerval *oitv);
250 253
251 254 /* pr_getrctl.c */
252 255 int pr_getrctl(struct ps_prochandle *Pr, const char *rname,
253 256 rctlblk_t *old_blk, rctlblk_t *new_blk, int rflag);
254 257 int pr_setrctl(struct ps_prochandle *Pr, const char *rname,
255 258 rctlblk_t *old_blk, rctlblk_t *new_blk, int rflag);
256 259 int pr_setprojrctl(struct ps_prochandle *Pr, const char *rname,
257 260 rctlblk_t *new_blk, size_t size, int rflag);
258 261
259 262 /* pr_getrlimit.c */
260 263 int pr_getrlimit(struct ps_prochandle *Pr,
261 264 int resource, struct rlimit *rlp);
262 265 int pr_setrlimit(struct ps_prochandle *Pr,
263 266 int resource, const struct rlimit *rlp);
264 267 int pr_getrlimit64(struct ps_prochandle *Pr,
265 268 int resource, struct rlimit64 *rlp);
266 269 int pr_setrlimit64(struct ps_prochandle *Pr,
267 270 int resource, const struct rlimit64 *rlp);
268 271
269 272 /* pr_getsockname.c */
270 273 int pr_getsockname(struct ps_prochandle *Pr,
271 274 int sock, struct sockaddr *name, socklen_t *namelen);
272 275 int pr_getpeername(struct ps_prochandle *Pr,
273 276 int sock, struct sockaddr *name, socklen_t *namelen);
274 277
275 278 /* pr_ioctl.c */
276 279 int pr_ioctl(struct ps_prochandle *Pr,
277 280 int fd, int code, void *buf, size_t size);
278 281
279 282 /* pr_lseek.c */
280 283 off_t pr_lseek(struct ps_prochandle *Pr,
281 284 int filedes, off_t offset, int whence);
282 285 offset_t pr_llseek(struct ps_prochandle *Pr,
283 286 int filedes, offset_t offset, int whence);
284 287
285 288 /* pr_memcntl.c */
286 289 int pr_memcntl(struct ps_prochandle *Pr,
287 290 caddr_t addr, size_t len, int cmd, caddr_t arg, int attr, int mask);
288 291
289 292 /* pr_mmap.c */
290 293 void *pr_mmap(struct ps_prochandle *Pr,
291 294 void *addr, size_t len, int prot, int flags, int fd, off_t off);
292 295 int pr_munmap(struct ps_prochandle *Pr,
293 296 void *addr, size_t len);
294 297 void *pr_zmap(struct ps_prochandle *Pr,
295 298 void *addr, size_t len, int prot, int flags);
296 299
297 300 /* pr_open.c */
298 301 int pr_open(struct ps_prochandle *Pr,
299 302 const char *filename, int flags, mode_t mode);
300 303 int pr_creat(struct ps_prochandle *Pr,
301 304 const char *filename, mode_t mode);
302 305 int pr_close(struct ps_prochandle *Pr, int fd);
303 306 int pr_access(struct ps_prochandle *Pr, const char *path, int amode);
304 307
305 308 /* pr_pbind.c */
306 309 int pr_processor_bind(struct ps_prochandle *Pr, idtype_t, id_t, int, int *);
307 310
308 311 /* pr_rename.c */
309 312 int pr_rename(struct ps_prochandle *Pr, const char *old, const char *new);
310 313 int pr_link(struct ps_prochandle *Pr, const char *exist, const char *new);
311 314 int pr_unlink(struct ps_prochandle *Pr, const char *);
312 315
313 316 /* pr_sigaction.c */
314 317 int pr_sigaction(struct ps_prochandle *Pr,
315 318 int sig, const struct sigaction *act, struct sigaction *oact);
316 319
317 320 /* pr_stat.c */
318 321 int pr_stat(struct ps_prochandle *Pr, const char *path, struct stat *buf);
319 322 int pr_lstat(struct ps_prochandle *Pr, const char *path, struct stat *buf);
320 323 int pr_fstat(struct ps_prochandle *Pr, int fd, struct stat *buf);
321 324 int pr_stat64(struct ps_prochandle *Pr, const char *path,
322 325 struct stat64 *buf);
323 326 int pr_lstat64(struct ps_prochandle *Pr, const char *path,
324 327 struct stat64 *buf);
325 328 int pr_fstat64(struct ps_prochandle *Pr, int fd, struct stat64 *buf);
326 329
327 330 /* pr_statvfs.c */
328 331 int pr_statvfs(struct ps_prochandle *Pr, const char *path, statvfs_t *buf);
329 332 int pr_fstatvfs(struct ps_prochandle *Pr, int fd, statvfs_t *buf);
330 333
331 334 /* pr_tasksys.c */
332 335 projid_t pr_getprojid(struct ps_prochandle *Pr);
333 336 taskid_t pr_gettaskid(struct ps_prochandle *Pr);
334 337 taskid_t pr_settaskid(struct ps_prochandle *Pr, projid_t project, int flags);
335 338
336 339 /* pr_waitid.c */
337 340 int pr_waitid(struct ps_prochandle *Pr,
338 341 idtype_t idtype, id_t id, siginfo_t *infop, int options);
339 342
340 343 /* proc_get_info.c */
341 344 int proc_get_cred(pid_t pid, prcred_t *credp, int ngroups);
342 345 prpriv_t *proc_get_priv(pid_t pid);
343 346 int proc_get_psinfo(pid_t pid, psinfo_t *psp);
344 347 int proc_get_status(pid_t pid, pstatus_t *psp);
345 348 int proc_get_auxv(pid_t pid, auxv_t *pauxv, int naux);
346 349
347 350 /* proc_names.c */
348 351 char *proc_fltname(int flt, char *buf, size_t bufsz);
349 352 char *proc_signame(int sig, char *buf, size_t bufsz);
350 353 char *proc_sysname(int sys, char *buf, size_t bufsz);
351 354
352 355 int proc_str2flt(const char *str, int *fltnum);
353 356 int proc_str2sig(const char *str, int *signum);
354 357 int proc_str2sys(const char *str, int *sysnum);
355 358
356 359 char *proc_fltset2str(const fltset_t *set, const char *delim, int members,
357 360 char *buf, size_t nbytes);
358 361 char *proc_sigset2str(const sigset_t *set, const char *delim, int members,
359 362 char *buf, size_t nbytes);
360 363 char *proc_sysset2str(const sysset_t *set, const char *delim, int members,
361 364 char *buf, size_t nbytes);
362 365
363 366 char *proc_str2fltset(const char *str, const char *delim, int members,
364 367 fltset_t *set);
365 368 char *proc_str2sigset(const char *str, const char *delim, int members,
366 369 sigset_t *set);
367 370 char *proc_str2sysset(const char *str, const char *delim, int members,
368 371 sysset_t *set);
369 372
370 373 int proc_walk(proc_walk_f *func, void *arg, int flags);
371 374
372 375 /* proc_arg.c */
373 376 struct ps_prochandle *proc_arg_grab(const char *arg,
374 377 int oflag, int gflag, int *perr);
375 378
376 379 pid_t proc_arg_psinfo(const char *arg, int oflag, psinfo_t *psp, int *perr);
377 380 void proc_unctrl_psinfo(psinfo_t *psp);
378 381
379 382 /* proc_set.c */
380 383 int Psetcred(struct ps_prochandle *Pr, const prcred_t *pcred);
381 384
382 385 /* Pstack.c */
383 386 int Pstack_iter(struct ps_prochandle *Pr,
384 387 const prgregset_t regs, proc_stack_f *func, void *arg);
385 388
386 389 /* Pisadep.c */
387 390 const char *Ppltdest(struct ps_prochandle *Pr, uintptr_t addr);
↓ open down ↓ |
328 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX