llib-lproc revision 186f7fbf5e07d046b50e4e15c32b21f109b76c80
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * CDDL HEADER START
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * The contents of this file are subject to the terms of the
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * Common Development and Distribution License (the "License").
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * You may not use this file except in compliance with the License.
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * See the License for the specific language governing permissions
0662ed52e814f8f08ef0e09956413a792584eddffuankg * and limitations under the License.
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * When distributing Covered Code, include this CDDL HEADER in each
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * If applicable, add the following below this CDDL HEADER, with the
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * fields enclosed by brackets "[]" replaced with your own identifying
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * information: Portions Copyright [yyyy] [name of copyright owner]
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * CDDL HEADER END
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg/* LINTLIBRARY */
44f575c8cb19a7a5cd61664a7848be6bc197df02fuankg/* PROTOLIB1 */
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * Use is subject to license terms.
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* Pcontrol.c */
96e08422d46465ebd7105bf48e475f77e60250d7wrowestruct ps_prochandle *Pcreate(const char *file, char *const *argv,
96e08422d46465ebd7105bf48e475f77e60250d7wrowestruct ps_prochandle *Pgrab(pid_t pid, int gflag, int *perr);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pcred(struct ps_prochandle *Pr, prcred_t *pcrp, int ngroups);
96e08422d46465ebd7105bf48e475f77e60250d7wrowessize_t Ppriv(struct ps_prochandle *Pr, prpriv_t *pprivp, size_t);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pstopstatus(struct ps_prochandle *Pr, long cmd, uint_t msec);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pgetareg(struct ps_prochandle *Pr, int regno, prgreg_t *preg);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pputareg(struct ps_prochandle *Pr, int regno, prgreg_t reg);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psetrun(struct ps_prochandle *Pr, int sig, int flags);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psetbkpt(struct ps_prochandle *Pr, uintptr_t address, ulong_t *saved);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pdelbkpt(struct ps_prochandle *Pr, uintptr_t address, ulong_t saved);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psetwapt(struct ps_prochandle *Pr, const prwatch_t *wp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pdelwapt(struct ps_prochandle *Pr, const prwatch_t *wp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pxecwapt(struct ps_prochandle *Pr, const prwatch_t *wp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psignal(struct ps_prochandle *Pr, int which, int stop);
96e08422d46465ebd7105bf48e475f77e60250d7wrowevoid Psetsignal(struct ps_prochandle *Pr, const sigset_t *set);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pfault(struct ps_prochandle *Pr, int which, int stop);
96e08422d46465ebd7105bf48e475f77e60250d7wrowevoid Psetfault(struct ps_prochandle *Pr, const fltset_t *set);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psysentry(struct ps_prochandle *Pr, int which, int stop);
96e08422d46465ebd7105bf48e475f77e60250d7wrowevoid Psetsysentry(struct ps_prochandle *Pr, const sysset_t *set);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psysexit(struct ps_prochandle *Pr, int which, int stop);
96e08422d46465ebd7105bf48e475f77e60250d7wrowevoid Psetsysexit(struct ps_prochandle *Pr, const sysset_t *set);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_iter(struct ps_prochandle *Pr, proc_lwp_f *func, void *cd);
96e08422d46465ebd7105bf48e475f77e60250d7wrowestruct ps_lwphandle *Lgrab(struct ps_prochandle *P, lwpid_t lwpid, int *perr);
96e08422d46465ebd7105bf48e475f77e60250d7wrowestruct ps_prochandle *Lprochandle(struct ps_lwphandle *Lwp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Lgetareg(struct ps_lwphandle *Lwp, int regno, prgreg_t *preg);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Lputareg(struct ps_lwphandle *Lwp, int regno, prgreg_t reg);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Lsetrun(struct ps_lwphandle *Lwp, int sig, int flags);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Lxecwapt(struct ps_lwphandle *Lwp, const prwatch_t *wp);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* Plwpregs.c */
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_getregs(struct ps_prochandle *Pr, lwpid_t i, prgregset_t gr);
0662ed52e814f8f08ef0e09956413a792584eddffuankgint Plwp_setregs(struct ps_prochandle *Pr, lwpid_t i, const prgregset_t gr);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_getfpregs(struct ps_prochandle *Pr, lwpid_t i, prfpregset_t *fp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_setfpregs(struct ps_prochandle *Pr, lwpid_t i, const prfpregset_t *fp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_getxregs(struct ps_prochandle *Pr, lwpid_t i, prxregset_t *xr);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_setxregs(struct ps_prochandle *Pr, lwpid_t i, const prxregset_t *xr);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_getasrs(struct ps_prochandle *Pr, lwpid_t i, asrset_t asrs);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_setasrs(struct ps_prochandle *Pr, lwpid_t i, const asrset_t asrs);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plwp_getpsinfo(struct ps_prochandle *Pr, lwpid_t i, lwpsinfo_t *lps);
0662ed52e814f8f08ef0e09956413a792584eddffuankg/* Pcore.c */
96e08422d46465ebd7105bf48e475f77e60250d7wrowestruct ps_prochandle *Pfgrab_core(int fd, const char *aout, int *perr);
96e08422d46465ebd7105bf48e475f77e60250d7wrowestruct ps_prochandle *Pgrab_core(const char *core, const char *aout,
0662ed52e814f8f08ef0e09956413a792584eddffuankg/* Pisprocdir.c */
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pisprocdir(struct ps_prochandle *Pr, const char *dir);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* Pservice.c */
96e08422d46465ebd7105bf48e475f77e60250d7wroweps_err_e ps_pdmodel(struct ps_prochandle *Pr, int *modelp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweps_err_e ps_lstop(struct ps_prochandle *Pr, lwpid_t lwpid);
96e08422d46465ebd7105bf48e475f77e60250d7wroweps_err_e ps_lcontinue(struct ps_prochandle *Pr, lwpid_t lwpid);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* Psymtab.c */
96e08422d46465ebd7105bf48e475f77e60250d7wroweconst prmap_t *Paddr_to_map(struct ps_prochandle *Pr, uintptr_t addr);
96e08422d46465ebd7105bf48e475f77e60250d7wroweconst prmap_t *Paddr_to_text_map(struct ps_prochandle *Pr, uintptr_t addr);
96e08422d46465ebd7105bf48e475f77e60250d7wroweconst prmap_t *Pname_to_map(struct ps_prochandle *Pr, const char *name);
96e08422d46465ebd7105bf48e475f77e60250d7wroweconst prmap_t *Plmid_to_map(struct ps_prochandle *Pr, Lmid_t lmid,
96e08422d46465ebd7105bf48e475f77e60250d7wrowe const char *name);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plookup_by_addr(struct ps_prochandle *Pr, uintptr_t addr,
96e08422d46465ebd7105bf48e475f77e60250d7wrowe char *sym_name_buffer, size_t bufsize, GElf_Sym *symbolp);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe Lmid_t lmid, const char *object_name, const char *symbol_name,
96e08422d46465ebd7105bf48e475f77e60250d7wroweconst rd_loadobj_t *Paddr_to_loadobj(struct ps_prochandle *, uintptr_t);
96e08422d46465ebd7105bf48e475f77e60250d7wroweconst rd_loadobj_t *Pname_to_loadobj(struct ps_prochandle *, const char *);
96e08422d46465ebd7105bf48e475f77e60250d7wroweconst rd_loadobj_t *Plmid_to_loadobj(struct ps_prochandle *, Lmid_t,
96e08422d46465ebd7105bf48e475f77e60250d7wrowe const char *);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pmapping_iter(struct ps_prochandle *Pr, proc_map_f *func, void *cd);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pmapping_iter_resolved(struct ps_prochandle *Pr, proc_map_f *func,
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pobject_iter(struct ps_prochandle *Pr, proc_map_f *func, void *cd);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Pobject_iter_resolved(struct ps_prochandle *Pr, proc_map_f *func,
96e08422d46465ebd7105bf48e475f77e60250d7wrowechar *Pobjname(struct ps_prochandle *Pr, uintptr_t addr,
96e08422d46465ebd7105bf48e475f77e60250d7wrowechar *Pobjname_resolved(struct ps_prochandle *Pr, uintptr_t addr,
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Plmid(struct ps_prochandle *Pr, uintptr_t addr, Lmid_t *lmidp);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psymbol_iter(struct ps_prochandle *Pr, const char *object_name,
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Psymbol_iter_by_lmid(struct ps_prochandle *Pr, Lmid_t lmid,
96e08422d46465ebd7105bf48e475f77e60250d7wrowechar *Pgetenv(struct ps_prochandle *Pr, const char *name,
96e08422d46465ebd7105bf48e475f77e60250d7wrowechar *Pplatform(struct ps_prochandle *Pr, char *s, size_t n);
96e08422d46465ebd7105bf48e475f77e60250d7wroweint Puname(struct ps_prochandle *Pr, struct utsname *u);
96e08422d46465ebd7105bf48e475f77e60250d7wrowechar *Pzonename(struct ps_prochandle *Pr, char *s, size_t n);
96e08422d46465ebd7105bf48e475f77e60250d7wrowechar *Pfindobj(struct ps_prochandle *Pr, const char *path,
96e08422d46465ebd7105bf48e475f77e60250d7wrowe char *s, size_t n);
96e08422d46465ebd7105bf48e475f77e60250d7wrowechar *Pexecname(struct ps_prochandle *Pr, char *buffer, size_t bufsize);
96e08422d46465ebd7105bf48e475f77e60250d7wroweps_err_e ps_pauxv(struct ps_prochandle *Pr, const auxv_t **aux);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* Putil.c */
96e08422d46465ebd7105bf48e475f77e60250d7wrowevoid Perror_printf(struct ps_prochandle *Pr, const char *format, ...);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* pr_door.c */
96e08422d46465ebd7105bf48e475f77e60250d7wroweint pr_door_info(struct ps_prochandle *Pr, int did, door_info_t *di);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* pr_exit.c */
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* pr_fcntl.c */
96e08422d46465ebd7105bf48e475f77e60250d7wroweint pr_fcntl(struct ps_prochandle *Pr, int fd, int cmd, void *argp);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* pr_getitimer.c */
96e08422d46465ebd7105bf48e475f77e60250d7wrowe int which, const struct itimerval *itv, struct itimerval *oitv);
96e08422d46465ebd7105bf48e475f77e60250d7wrowe/* pr_getrctl.c */
96e08422d46465ebd7105bf48e475f77e60250d7wroweint pr_getrctl(struct ps_prochandle *Pr, const char *rname,
96e08422d46465ebd7105bf48e475f77e60250d7wroweint pr_setrctl(struct ps_prochandle *Pr, const char *rname,
96e08422d46465ebd7105bf48e475f77e60250d7wroweint pr_setprojrctl(struct ps_prochandle *Pr, const char *rname,
0662ed52e814f8f08ef0e09956413a792584eddffuankg/* pr_getrlimit.c */