proc_getpid
if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) {
if (ptrace(PT_STEP, proc_getpid(phdl), (caddr_t)1, 0) < 0) {
if (kill(proc_getpid(phdl), SIGSTOP) == -1) {
DPRINTF("kill %d", proc_getpid(phdl));
} else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) {
DPRINTF("waitpid %d", proc_getpid(phdl));
if (ptrace(PT_ATTACH, proc_getpid(phdl), 0, 0) != 0) {
if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0)
if (ptrace(PT_SETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0)
if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0)
if (waitpid(proc_getpid(phdl), &status, WUNTRACED) < 0) {
if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0)
if (ptrace(PT_LWPINFO, proc_getpid(phdl), (caddr_t)&lwpinfo,
if (ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)(uintptr_t)1,
pid = proc_getpid(phdl);
if ((kves = kinfo_getvmmap(proc_getpid(rdap->rda_php), &cnt)) == NULL) {
proc_getpid(rdap->rda_php), &count);