Lines Matching refs:phdl
82 proc_stop(struct proc_handle *phdl)
86 if (kill(proc_getpid(phdl), SIGSTOP) == -1) {
87 DPRINTF("kill %d", proc_getpid(phdl));
89 } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) {
90 DPRINTF("waitpid %d", proc_getpid(phdl));
101 proc_bkptset(struct proc_handle *phdl, uintptr_t address,
109 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD ||
110 phdl->status == PS_IDLE) {
118 if (phdl->status != PS_STOP) {
119 if (proc_stop(phdl) != 0)
132 if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
147 if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
157 proc_continue(phdl);
163 proc_bkptdel(struct proc_handle *phdl, uintptr_t address,
170 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD ||
171 phdl->status == PS_IDLE) {
179 if (phdl->status != PS_STOP) {
180 if (proc_stop(phdl) != 0)
193 if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
201 proc_continue(phdl);
228 proc_bkptexec(struct proc_handle *phdl, unsigned long saved)
234 if (proc_regget(phdl, REG_PC, &pc) < 0) {
239 if (proc_bkptdel(phdl, pc, saved) < 0) {
247 proc_regset(phdl, REG_PC, pc);
248 if (ptrace(PT_STEP, proc_getpid(phdl), (caddr_t)1, 0) < 0) {
252 proc_wstatus(phdl);
253 status = proc_getwstat(phdl);
262 if (proc_bkptset(phdl, pc, &samesaved) < 0) {