/freebsd-13-stable/lib/libproc/ |
H A D | proc_rtld.c | 50 struct proc_handle *phdl; local 53 phdl = arg; 54 if (phdl->nmappings >= phdl->maparrsz) { 55 phdl->maparrsz *= 2; 56 tmp = reallocarray(phdl->mappings, phdl->maparrsz, 57 sizeof(*phdl->mappings)); 60 phdl->mappings = tmp; 63 mapping = &phdl 113 proc_rdagent(struct proc_handle *phdl) argument 133 proc_updatesyms(struct proc_handle *phdl) argument [all...] |
H A D | proc_util.c | 49 proc_clearflags(struct proc_handle *phdl, int mask) argument 52 if (phdl == NULL) 55 phdl->flags &= ~mask; 64 proc_continue(struct proc_handle *phdl) argument 68 if (phdl == NULL) 71 if (phdl->status == PS_STOP && WSTOPSIG(phdl->wstat) != SIGTRAP) 72 pending = WSTOPSIG(phdl->wstat); 75 if (ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)(uintptr_t)1, 79 phdl 85 proc_detach(struct proc_handle *phdl, int reason) argument 115 proc_getflags(struct proc_handle *phdl) argument 125 proc_setflags(struct proc_handle *phdl, int mask) argument 137 proc_state(struct proc_handle *phdl) argument 147 proc_getmodel(struct proc_handle *phdl) argument 157 proc_wstatus(struct proc_handle *phdl) argument 178 proc_getwstat(struct proc_handle *phdl) argument 197 proc_read(struct proc_handle *phdl, void *buf, size_t size, size_t addr) argument 214 proc_getlwpstatus(struct proc_handle *phdl) argument [all...] |
H A D | proc_bkpt.c | 82 proc_stop(struct proc_handle *phdl) argument 86 if (kill(proc_getpid(phdl), SIGSTOP) == -1) { 87 DPRINTF("kill %d", proc_getpid(phdl)); 89 } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) { 90 DPRINTF("waitpid %d", proc_getpid(phdl)); 101 proc_bkptset(struct proc_handle *phdl, uintptr_t address, argument 109 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 110 phdl->status == PS_IDLE) { 118 if (phdl 163 proc_bkptdel(struct proc_handle *phdl, uintptr_t address, unsigned long saved) argument 228 proc_bkptexec(struct proc_handle *phdl, unsigned long saved) argument [all...] |
H A D | proc_create.c | 78 struct proc_handle *phdl; local 82 if ((phdl = malloc(sizeof(*phdl))) == NULL) 85 memset(phdl, 0, sizeof(*phdl)); 86 phdl->public.pid = pid; 87 phdl->flags = flags; 88 phdl->status = status; 89 phdl->procstat = procstat_open_sysctl(); 90 if (phdl 131 struct proc_handle *phdl; local 184 struct proc_handle *phdl; local 242 proc_free(struct proc_handle *phdl) argument [all...] |
H A D | proc_regs.c | 47 proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue) argument 51 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 52 phdl->status == PS_IDLE) { 57 if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) 103 proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue) argument 107 if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || 108 phdl->status == PS_IDLE) { 112 if (ptrace(PT_GETREGS, proc_getpid(phdl), (caddr_ [all...] |
H A D | libproc.h | 130 #define proc_getpid(phdl) (((struct proc_handle_public *)(phdl))->pid)
|
/freebsd-13-stable/lib/libproc/tests/ |
H A D | proc_test.c | 54 struct proc_handle *phdl; local 68 error = proc_create(argv[0], argv, NULL, NULL, NULL, &phdl); 70 ATF_REQUIRE(phdl != NULL); 75 return (phdl); 79 set_bkpt(struct proc_handle *phdl, uintptr_t addr, u_long *saved) argument 83 error = proc_bkptset(phdl, addr, saved); 89 remove_bkpt(struct proc_handle *phdl, uintptr_t addr, u_long val) argument 93 error = proc_bkptdel(phdl, addr, val); 97 error = proc_regset(phdl, REG_PC, addr); 105 verify_bkpt(struct proc_handle *phdl, GElf_Sy argument 167 struct proc_handle *phdl; local 198 struct proc_handle *phdl; local 230 struct proc_handle *phdl; local 269 struct proc_handle *phdl; local 308 struct proc_handle *phdl; local 344 struct proc_handle *phdl; local 386 struct proc_handle *phdl; local 418 struct proc_handle *phdl; local 449 struct proc_handle *phdl; local [all...] |