Home
last modified time | relevance | path

Searched refs:phdl (Results 1 – 8 of 8) sorted by relevance

/freebsd-9-stable/lib/libproc/
Dproc_rtld.c43 struct proc_handle *phdl = arg; in map_iter() local
45 if (phdl->nobjs >= phdl->rdobjsz) { in map_iter()
46 phdl->rdobjsz *= 2; in map_iter()
47 phdl->rdobjs = reallocf(phdl->rdobjs, sizeof(*phdl->rdobjs) * in map_iter()
48 phdl->rdobjsz); in map_iter()
49 if (phdl->rdobjs == NULL) in map_iter()
52 if (strcmp(lop->rdl_path, phdl->execname) == 0 && in map_iter()
54 phdl->rdexec = &phdl->rdobjs[phdl->nobjs]; in map_iter()
55 memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*lop)); in map_iter()
61 proc_rdagent(struct proc_handle *phdl) in proc_rdagent() argument
[all …]
Dproc_util.c44 proc_clearflags(struct proc_handle *phdl, int mask) in proc_clearflags() argument
47 if (phdl == NULL) in proc_clearflags()
50 phdl->flags &= ~mask; in proc_clearflags()
59 proc_continue(struct proc_handle *phdl) in proc_continue() argument
63 if (phdl == NULL) in proc_continue()
66 if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP) in proc_continue()
67 pending = WSTOPSIG(phdl->wstat); in proc_continue()
68 if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t)1, pending) != 0) in proc_continue()
71 phdl->status = PS_RUN; in proc_continue()
77 proc_detach(struct proc_handle *phdl, int reason) in proc_detach() argument
[all …]
Dproc_bkpt.c53 proc_stop(struct proc_handle *phdl) in proc_stop() argument
57 if (kill(proc_getpid(phdl), SIGSTOP) == -1) { in proc_stop()
58 DPRINTF("kill %d", proc_getpid(phdl)); in proc_stop()
60 } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) { in proc_stop()
61 DPRINTF("waitpid %d", proc_getpid(phdl)); in proc_stop()
72 proc_bkptset(struct proc_handle *phdl, uintptr_t address, in proc_bkptset() argument
80 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || in proc_bkptset()
81 phdl->status == PS_IDLE) { in proc_bkptset()
89 if (phdl->status != PS_STOP) { in proc_bkptset()
90 if (proc_stop(phdl) != 0) in proc_bkptset()
[all …]
Dproc_create.c46 proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl) in proc_init() argument
51 memset(phdl, 0, sizeof(*phdl)); in proc_init()
52 phdl->pid = pid; in proc_init()
53 phdl->flags = flags; in proc_init()
54 phdl->status = status; in proc_init()
60 len = sizeof(phdl->execname); in proc_init()
61 if (sysctl(mib, 4, phdl->execname, &len, NULL, 0) != 0) { in proc_init()
67 phdl->execname[0] = '\0'; in proc_init()
75 struct proc_handle *phdl; in proc_attach() local
86 if ((phdl = malloc(sizeof(struct proc_handle))) == NULL) in proc_attach()
[all …]
Dproc_regs.c43 proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue) in proc_regget() argument
47 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || in proc_regget()
48 phdl->status == PS_IDLE) { in proc_regget()
53 if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)&regs, 0) < 0) in proc_regget()
79 proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue) in proc_regset() argument
83 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || in proc_regset()
84 phdl->status == PS_IDLE) { in proc_regset()
88 if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)&regs, 0) < 0) in proc_regset()
109 if (ptrace(PT_SETREGS, proc_getpid(phdl), (caddr_t)&regs, 0) < 0) in proc_regset()
/freebsd-9-stable/lib/libproc/test/t1-bkpt/
Dt1-bkpt.c48 struct proc_handle *phdl; in t1_bkpt_d() local
52 proc_create("./t1-bkpt", targv, NULL, NULL, &phdl); in t1_bkpt_d()
53 proc_bkptset(phdl, (uintptr_t)t1_bkpt_t, &saved); in t1_bkpt_d()
54 proc_continue(phdl); in t1_bkpt_d()
55 assert(WIFSTOPPED(proc_wstatus(phdl))); in t1_bkpt_d()
56 proc_bkptexec(phdl, saved); in t1_bkpt_d()
57 proc_continue(phdl); in t1_bkpt_d()
58 proc_wait(phdl); in t1_bkpt_d()
59 proc_free(phdl); in t1_bkpt_d()
/freebsd-9-stable/lib/libproc/test/t3-name2sym/
Dt3-name2sym.c41 struct proc_handle *phdl; in main() local
44 proc_create("./t3-name2sym", argv, NULL, NULL, &phdl); in main()
46 assert(proc_name2sym(phdl, "ld-elf.so.1", "r_debug_state", &sym) == 0); in main()
48 assert(proc_name2sym(phdl, "t3-name2sym", "main", &sym) == 0); in main()
/freebsd-9-stable/lib/libproc/test/t2-name2map/
Dt2-name2map.c41 struct proc_handle *phdl; in main() local
43 proc_create("./t2-name2map", argv, NULL, NULL, &phdl); in main()
44 map = proc_name2map(phdl, "ld-elf.so.1"); in main()