/freebsd-9.3-release/lib/libproc/ |
H A D | proc_rtld.c | 43 struct proc_handle *phdl = arg; local 45 if (phdl->nobjs >= phdl->rdobjsz) { 46 phdl->rdobjsz *= 2; 47 phdl->rdobjs = reallocf(phdl->rdobjs, sizeof(*phdl->rdobjs) * 48 phdl->rdobjsz); 49 if (phdl->rdobjs == NULL) 52 memcpy(&phdl 58 proc_rdagent(struct proc_handle *phdl) argument 75 proc_updatesyms(struct proc_handle *phdl) argument [all...] |
H A D | proc_util.c | 45 proc_clearflags(struct proc_handle *phdl, int mask) argument 48 if (phdl == NULL) 51 phdl->flags &= ~mask; 60 proc_continue(struct proc_handle *phdl) argument 63 if (phdl == NULL) 66 if (ptrace(PT_CONTINUE, phdl->pid, (caddr_t)(uintptr_t) 1, 0) != 0) 69 phdl->status = PS_RUN; 75 proc_detach(struct proc_handle *phdl, int reason) argument 79 if (phdl == NULL) 82 kill(phdl 99 proc_getflags(struct proc_handle *phdl) argument 109 proc_setflags(struct proc_handle *phdl, int mask) argument 121 proc_state(struct proc_handle *phdl) argument 131 proc_getpid(struct proc_handle *phdl) argument 141 proc_wstatus(struct proc_handle *phdl) argument 162 proc_getwstat(struct proc_handle *phdl) argument 181 proc_read(struct proc_handle *phdl, void *buf, size_t size, size_t addr) argument 198 proc_getlwpstatus(struct proc_handle *phdl) argument [all...] |
H A D | proc_create.c | 43 struct proc_handle *phdl; local 54 if ((phdl = malloc(sizeof(struct proc_handle))) == NULL) 57 memset(phdl, 0, sizeof(struct proc_handle)); 58 phdl->pid = pid; 59 phdl->flags = flags; 60 phdl->status = PS_RUN; 63 if (ptrace(PT_ATTACH, phdl->pid, 0, 0) != 0) { 80 phdl->status = PS_STOP; 84 proc_free(phdl); 86 *pphdl = phdl; 94 struct proc_handle *phdl; local 154 proc_free(struct proc_handle *phdl) argument [all...] |
H A D | proc_bkpt.c | 53 proc_cont(struct proc_handle *phdl) argument 56 ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); 60 proc_stop(struct proc_handle *phdl) argument 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, argument 87 if (phdl->status == PS_DEAD || phdl 140 proc_bkptdel(struct proc_handle *phdl, uintptr_t address, unsigned long saved) argument 195 proc_bkptexec(struct proc_handle *phdl, unsigned long saved) argument [all...] |
H A D | proc_regs.c | 43 proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue) argument 47 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 48 phdl->status == PS_IDLE) { 53 if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) 79 proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue) argument 83 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 84 phdl->status == PS_IDLE) { 88 if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_ [all...] |
/freebsd-9.3-release/lib/libproc/test/t1-bkpt/ |
H A D | t1-bkpt.c | 48 struct proc_handle *phdl; local 52 proc_create("./t1-bkpt", targv, NULL, NULL, &phdl); 53 proc_bkptset(phdl, (uintptr_t)t1_bkpt_t, &saved); 54 proc_continue(phdl); 55 assert(WIFSTOPPED(proc_wstatus(phdl))); 56 proc_bkptexec(phdl, saved); 57 proc_continue(phdl); 58 proc_wait(phdl); 59 proc_free(phdl);
|
/freebsd-9.3-release/lib/libproc/test/t2-name2map/ |
H A D | t2-name2map.c | 41 struct proc_handle *phdl; local 43 proc_create("./t2-name2map", argv, NULL, NULL, &phdl); 44 map = proc_name2map(phdl, "ld-elf.so.1");
|
/freebsd-9.3-release/lib/libproc/test/t3-name2sym/ |
H A D | t3-name2sym.c | 41 struct proc_handle *phdl; local 44 proc_create("./t3-name2sym", argv, NULL, NULL, &phdl); 46 assert(proc_name2sym(phdl, "ld-elf.so.1", "r_debug_state", &sym) == 0); 48 assert(proc_name2sym(phdl, "t3-name2sym", "main", &sym) == 0);
|