/netbsd-current/external/bsd/libproc/dist/ |
H A D | proc_rtld.c | 47 struct proc_handle *phdl = arg; local 49 if (phdl->nobjs >= phdl->rdobjsz) { 50 phdl->rdobjsz *= 2; 51 if (reallocarr(&phdl->rdobjs, sizeof(*phdl->rdobjs), 52 phdl->rdobjsz)) 55 if (strcmp(lop->rdl_path, phdl->execname) == 0 && 57 phdl->rdexec = &phdl 64 proc_rdagent(struct proc_handle *phdl) argument 81 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 64 if (phdl == NULL) 67 if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP) 68 pending = WSTOPSIG(phdl->wstat); 69 if (ptrace(PT_CONTINUE, phdl->pid, (void *)(uintptr_t)1, pending) != 0) 72 phdl 78 proc_detach(struct proc_handle *phdl, int reason) argument 116 proc_getflags(struct proc_handle *phdl) argument 126 proc_setflags(struct proc_handle *phdl, int mask) argument 138 proc_state(struct proc_handle *phdl) argument 148 proc_getmodel(struct proc_handle *phdl) argument 158 proc_getpid(struct proc_handle *phdl) argument 168 proc_wstatus(struct proc_handle *phdl) argument 189 proc_getwstat(struct proc_handle *phdl) argument 208 proc_read(struct proc_handle *phdl, void *buf, size_t size, size_t addr) argument 225 proc_getlwpstatus(struct proc_handle *phdl) argument [all...] |
H A D | proc_bkpt.c | 55 proc_stop(struct proc_handle *phdl) argument 59 if (kill(proc_getpid(phdl), SIGSTOP) == -1) { 60 DPRINTF("kill %d", proc_getpid(phdl)); 62 } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) { 63 DPRINTF("waitpid %d", proc_getpid(phdl)); 74 proc_bkptset(struct proc_handle *phdl, uintptr_t address, argument 82 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 83 phdl->status == PS_IDLE) { 91 if (phdl 136 proc_bkptdel(struct proc_handle *phdl, uintptr_t address, proc_breakpoint_t *saved) argument 201 proc_bkptexec(struct proc_handle *phdl, proc_breakpoint_t *saved) argument [all...] |
H A D | proc_regs.c | 48 proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue) argument 52 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 53 phdl->status == PS_IDLE) { 58 if (ptrace(PT_GETREGS, proc_getpid(phdl), ®s, 0) < 0) 84 proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue) argument 88 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 89 phdl->status == PS_IDLE) { 93 if (ptrace(PT_GETREGS, proc_getpid(phdl), [all...] |
H A D | proc_create.c | 48 proc_init(pid_t pid, int flags, int status, struct proc_handle *phdl) argument 54 memset(phdl, 0, sizeof(*phdl)); 55 phdl->pid = pid; 56 phdl->flags = flags; 57 phdl->status = status; 63 len = sizeof(phdl->execname); 64 if (sysctl(mib, 4, phdl->execname, &len, NULL, 0) != 0) { 70 phdl->execname[0] = '\0'; 85 phdl 96 struct proc_handle *phdl; local 147 struct proc_handle *phdl; local 207 proc_free(struct proc_handle *phdl) argument [all...] |
/netbsd-current/external/bsd/libproc/dist/tests/ |
H A D | proc_test.c | 77 struct proc_handle *phdl; local 91 error = proc_create(argv[0], argv, NULL, NULL, &phdl); 93 ATF_REQUIRE(phdl != NULL); 98 return (phdl); 102 set_bkpt(struct proc_handle *phdl, uintptr_t addr, proc_breakpoint_t *saved) argument 106 error = proc_bkptset(phdl, addr, saved); 112 remove_bkpt(struct proc_handle *phdl, uintptr_t addr, proc_breakpoint_t *val) argument 116 error = proc_bkptdel(phdl, addr, val); 120 error = proc_regset(phdl, REG_PC, addr); 128 verify_bkpt(struct proc_handle *phdl, GElf_Sy argument 189 struct proc_handle *phdl; local 221 struct proc_handle *phdl; local 255 struct proc_handle *phdl; local 294 struct proc_handle *phdl; local 333 struct proc_handle *phdl; local 369 struct proc_handle *phdl; local [all...] |