Lines Matching refs:phdl
53 proc_cont(struct proc_handle *phdl)
56 ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0);
60 proc_stop(struct proc_handle *phdl)
64 if (kill(proc_getpid(phdl), SIGSTOP) == -1) {
65 DPRINTF("kill %d", proc_getpid(phdl));
67 } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) {
68 DPRINTF("waitpid %d", proc_getpid(phdl));
79 proc_bkptset(struct proc_handle *phdl, uintptr_t address,
87 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD ||
88 phdl->status == PS_IDLE) {
95 if (phdl->status != PS_STOP)
96 if (proc_stop(phdl) != 0)
108 if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
124 if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
132 if (phdl->status != PS_STOP)
134 proc_cont(phdl);
140 proc_bkptdel(struct proc_handle *phdl, uintptr_t address,
147 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD ||
148 phdl->status == PS_IDLE) {
155 if (phdl->status != PS_STOP)
156 if (proc_stop(phdl) != 0)
168 if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
174 if (phdl->status != PS_STOP)
176 proc_cont(phdl);
195 proc_bkptexec(struct proc_handle *phdl, unsigned long saved)
201 if (proc_regget(phdl, REG_PC, &pc) < 0) {
206 if (proc_bkptdel(phdl, pc, saved) < 0) {
214 proc_regset(phdl, REG_PC, pc);
215 if (ptrace(PT_STEP, proc_getpid(phdl), (caddr_t)1, 0) < 0) {
219 proc_wstatus(phdl);
220 status = proc_getwstat(phdl);
229 if (proc_bkptset(phdl, pc, &samesaved) < 0) {