Lines Matching refs:phdl

49 proc_clearflags(struct proc_handle *phdl, int mask)
52 if (phdl == NULL)
55 phdl->flags &= ~mask;
64 proc_continue(struct proc_handle *phdl)
68 if (phdl == NULL)
71 if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP)
72 pending = WSTOPSIG(phdl->wstat);
75 if (ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)(uintptr_t)1,
79 phdl->status = PS_RUN;
85 proc_detach(struct proc_handle *phdl, int reason)
90 if (phdl == NULL)
95 kill(proc_getpid(phdl), SIGKILL);
98 if ((phdl->flags & PATTACH_RDONLY) != 0)
100 pid = proc_getpid(phdl);
110 proc_free(phdl);
115 proc_getflags(struct proc_handle *phdl)
118 if (phdl == NULL)
121 return (phdl->flags);
125 proc_setflags(struct proc_handle *phdl, int mask)
128 if (phdl == NULL)
131 phdl->flags |= mask;
137 proc_state(struct proc_handle *phdl)
140 if (phdl == NULL)
143 return (phdl->status);
147 proc_getmodel(struct proc_handle *phdl)
150 if (phdl == NULL)
153 return (phdl->model);
157 proc_wstatus(struct proc_handle *phdl)
161 if (phdl == NULL)
163 if (waitpid(proc_getpid(phdl), &status, WUNTRACED) < 0) {
169 phdl->status = PS_STOP;
171 phdl->status = PS_UNDEAD;
172 phdl->wstat = status;
174 return (phdl->status);
178 proc_getwstat(struct proc_handle *phdl)
181 if (phdl == NULL)
184 return (phdl->wstat);
197 proc_read(struct proc_handle *phdl, void *buf, size_t size, size_t addr)
201 if (phdl == NULL)
208 if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0)
214 proc_getlwpstatus(struct proc_handle *phdl)
217 lwpstatus_t *psp = &phdl->lwps;
220 if (phdl == NULL)
222 if (ptrace(PT_LWPINFO, proc_getpid(phdl), (caddr_t)&lwpinfo,