Lines Matching refs:proc
283 select_32_64(struct process *proc, void *p32, void *p64) in select_32_64() argument
285 if (sizeof(long) == 4 || proc->mask_32bit) in select_32_64()
292 fetch_dyn64(struct process *proc, arch_addr_t *addr, Elf64_Dyn *ret) in fetch_dyn64() argument
294 if (umovebytes(proc, *addr, ret, sizeof(*ret)) != sizeof(*ret)) in fetch_dyn64()
301 fetch_dyn32(struct process *proc, arch_addr_t *addr, Elf64_Dyn *ret) in fetch_dyn32() argument
304 if (umovebytes(proc, *addr, &dyn, sizeof(dyn)) != sizeof(dyn)) in fetch_dyn32()
315 dyn_fetcher(struct process *proc))(struct process *, in dyn_fetcher() argument
318 return select_32_64(proc, fetch_dyn32, fetch_dyn64); in dyn_fetcher()
322 proc_find_dynamic_entry_addr(struct process *proc, arch_addr_t src_addr, in proc_find_dynamic_entry_addr() argument
333 if (dyn_fetcher(proc)(proc, &src_addr, &entry) < 0 in proc_find_dynamic_entry_addr()
368 fetch_lm64(struct process *proc, arch_addr_t addr, in fetch_lm64() argument
371 if (umovebytes(proc, addr, ret, sizeof(*ret)) != sizeof(*ret)) in fetch_lm64()
377 fetch_lm32(struct process *proc, arch_addr_t addr, in fetch_lm32() argument
381 if (umovebytes(proc, addr, &lm, sizeof(lm)) != sizeof(lm)) in fetch_lm32()
394 lm_fetcher(struct process *proc))(struct process *, in lm_fetcher() argument
397 return select_32_64(proc, fetch_lm32, fetch_lm64); in lm_fetcher()
414 fetch_rd64(struct process *proc, arch_addr_t addr, in fetch_rd64() argument
417 if (umovebytes(proc, addr, ret, sizeof(*ret)) != sizeof(*ret)) in fetch_rd64()
423 fetch_rd32(struct process *proc, arch_addr_t addr, in fetch_rd32() argument
427 if (umovebytes(proc, addr, &rd, sizeof(rd)) != sizeof(rd)) in fetch_rd32()
440 rdebug_fetcher(struct process *proc))(struct process *, in rdebug_fetcher() argument
443 return select_32_64(proc, fetch_rd32, fetch_rd64); in rdebug_fetcher()
467 auxv_fetcher(struct process *proc))(int, Elf64_auxv_t *) in auxv_fetcher() argument
469 return select_32_64(proc, fetch_auxv32_entry, fetch_auxv64_entry); in auxv_fetcher()
473 crawl_linkmap(struct process *proc, struct lt_r_debug_64 *dbg) in crawl_linkmap() argument
488 if (lm_fetcher(proc)(proc, addr, &rlm) < 0) { in crawl_linkmap()
505 umovebytes(proc, (arch_addr_t)(uintptr_t)rlm.l_name, in crawl_linkmap()
531 if (proc_each_library(proc, NULL, library_with_key_cb, &key)) in crawl_linkmap()
546 if (ltelf_read_library(lib, proc, lib_name, rlm.l_addr) < 0) { in crawl_linkmap()
552 proc_add_library(proc, lib); in crawl_linkmap()
558 load_debug_struct(struct process *proc, struct lt_r_debug_64 *ret) in load_debug_struct() argument
562 if (rdebug_fetcher(proc)(proc, proc->os.debug_addr, ret) < 0) { in load_debug_struct()
571 rdebug_bp_on_hit(struct breakpoint *bp, struct process *proc) in rdebug_bp_on_hit() argument
576 if (load_debug_struct(proc, &rdbg) < 0) { in rdebug_bp_on_hit()
583 switch (proc->os.debug_state) { in rdebug_bp_on_hit()
586 crawl_linkmap(proc, &rdbg); in rdebug_bp_on_hit()
597 proc->os.debug_state = rdbg.r_state; in rdebug_bp_on_hit()
602 arch_find_dl_debug(struct process *proc, arch_addr_t dyn_addr, in arch_find_dl_debug() argument
605 return proc_find_dynamic_entry_addr(proc, dyn_addr, DT_DEBUG, ret); in arch_find_dl_debug()
610 linkmap_init(struct process *proc, arch_addr_t dyn_addr) in linkmap_init() argument
612 debug(DEBUG_FUNCTION, "linkmap_init(%d, dyn_addr=%p)", proc->pid, dyn_addr); in linkmap_init()
614 if (arch_find_dl_debug(proc, dyn_addr, &proc->os.debug_addr) == -1) { in linkmap_init()
621 if ((status = load_debug_struct(proc, &rdbg)) < 0) { in linkmap_init()
626 crawl_linkmap(proc, &rdbg); in linkmap_init()
631 if (arch_translate_address_dyn(proc, addr, &addr) < 0) in linkmap_init()
634 struct breakpoint *rdebug_bp = insert_breakpoint_at(proc, addr, NULL); in linkmap_init()
642 proc->pid, strerror(errno)); in linkmap_init()
665 process_removed(struct process *proc) in process_removed() argument
667 delete_events_for(proc); in process_removed()
671 process_get_entry(struct process *proc, in process_get_entry() argument
675 PROC_PID_FILE(fn, "/proc/%d/auxv", proc->pid); in process_get_entry()
692 if (auxv_fetcher(proc)(fd, &entry) < 0) in process_get_entry()
723 os_process_init(struct process *proc) in os_process_init() argument
725 proc->os.debug_addr = 0; in os_process_init()
726 proc->os.debug_state = 0; in os_process_init()
731 os_process_destroy(struct process *proc) in os_process_destroy() argument
736 os_process_clone(struct process *retp, struct process *proc) in os_process_clone() argument
738 retp->os = proc->os; in os_process_clone()
743 os_process_exec(struct process *proc) in os_process_exec() argument