Lines Matching refs:proc
121 trace_set_options(struct process *proc) in trace_set_options() argument
123 if (proc->tracesysgood & 0x80) in trace_set_options()
126 pid_t pid = proc->pid; in trace_set_options()
137 proc->tracesysgood |= 0x80; in trace_set_options()
157 if (event->proc != NULL && event->proc->pid == (pid_t)(uintptr_t)data) in event_for_pid()
331 ugly_workaround(struct process *proc) in ugly_workaround() argument
333 arch_addr_t ip = get_instruction_pointer(proc); in ugly_workaround()
335 if (DICT_FIND_VAL(proc->leader->breakpoints, &ip, &found) < 0) { in ugly_workaround()
336 insert_breakpoint_at(proc, ip, NULL); in ugly_workaround()
339 enable_breakpoint(proc, found); in ugly_workaround()
341 ptrace(PTRACE_CONT, proc->pid, 0, 0); in ugly_workaround()
386 && event->proc->leader == data in undo_breakpoint()
388 set_instruction_pointer(event->proc, event->e_un.brk_addr); in undo_breakpoint()
410 retract_breakpoint_cb(struct process *proc, struct breakpoint *bp, void *data) in retract_breakpoint_cb() argument
412 breakpoint_on_retract(bp, proc); in retract_breakpoint_cb()
426 struct process *proc = pid2proc(it->pid); in detach_process() local
427 if (proc == NULL) in detach_process()
429 if (proc->leader == leader) { in detach_process()
554 arch_sw_singlestep(struct process *proc, struct breakpoint *bp, in arch_sw_singlestep() argument
566 remove_sw_breakpoints(struct process *proc) in remove_sw_breakpoints() argument
569 = (void *)proc->leader->event_handler; in remove_sw_breakpoints()
577 delete_breakpoint_at(proc, self->sws_bps[i]->addr); in remove_sw_breakpoints()
583 sw_singlestep_bp_on_hit(struct breakpoint *bp, struct process *proc) in sw_singlestep_bp_on_hit() argument
585 remove_sw_breakpoints(proc); in sw_singlestep_bp_on_hit()
596 struct process *proc = self->task_enabling_breakpoint; in sw_singlestep_add_bp() local
606 = insert_breakpoint_at(proc, addr, NULL); in sw_singlestep_add_bp()
655 struct process *proc = self->task_enabling_breakpoint; in post_singlestep() local
657 remove_sw_breakpoints(proc); in post_singlestep()
721 struct process *task = event->proc; in process_stopping_on_event()
747 debug(1, "%d LT_EV_SYSRET", event->proc->pid); in process_stopping_on_event()
863 process_install_stopping_handler(struct process *proc, struct breakpoint *sbp, in process_install_stopping_handler() argument
871 "process_install_stopping_handler: pid=%d", proc->pid); in process_install_stopping_handler()
886 handler->task_enabling_breakpoint = proc; in process_install_stopping_handler()
892 install_event_handler(proc->leader, &handler->super); in process_install_stopping_handler()
894 if (each_task(proc->leader, NULL, &send_sigstop, in process_install_stopping_handler()
896 destroy_event_handler(proc); in process_install_stopping_handler()
904 .proc = proc, in process_install_stopping_handler()
912 continue_after_breakpoint(struct process *proc, struct breakpoint *sbp) in continue_after_breakpoint() argument
916 proc->pid, sbp->addr); in continue_after_breakpoint()
918 set_instruction_pointer(proc, sbp->addr); in continue_after_breakpoint()
921 continue_process(proc->pid); in continue_after_breakpoint()
923 (proc, sbp, NULL, NULL, NULL) < 0) { in continue_after_breakpoint()
926 continue_process(proc->pid); in continue_after_breakpoint()
948 struct process *task = event->proc; in ltrace_exiting_on_event()
981 ltrace_exiting_install_handler(struct process *proc) in ltrace_exiting_install_handler() argument
984 if (proc->leader != proc) in ltrace_exiting_install_handler()
989 if (proc->event_handler != NULL in ltrace_exiting_install_handler()
990 && proc->event_handler->on_event == <race_exiting_on_event) in ltrace_exiting_install_handler()
995 if (proc->event_handler != NULL) { in ltrace_exiting_install_handler()
996 assert(proc->event_handler->on_event in ltrace_exiting_install_handler()
999 = (void *)proc->event_handler; in ltrace_exiting_install_handler()
1015 install_event_handler(proc->leader, &handler->super); in ltrace_exiting_install_handler()
1017 if (each_task(proc->leader, NULL, &send_sigstop, in ltrace_exiting_install_handler()
1054 event->proc->pid, event->type); in process_vfork_on_event()
1057 struct process *proc = event->proc; in process_vfork_on_event() local
1068 DICT_FIND_VAL(proc->leader->breakpoints, in process_vfork_on_event()
1071 breakpoint_turn_on(sbp, proc->leader); in process_vfork_on_event()
1081 change_process_leader(proc, proc); in process_vfork_on_event()
1082 destroy_event_handler(proc); in process_vfork_on_event()
1083 continue_process(proc->parent->pid); in process_vfork_on_event()
1093 continue_after_vfork(struct process *proc) in continue_after_vfork() argument
1095 debug(DEBUG_PROCESS, "continue_after_vfork: pid=%d", proc->pid); in continue_after_vfork()
1101 continue_process(proc->parent->pid); in continue_after_vfork()
1108 install_event_handler(proc, &handler->super); in continue_after_vfork()
1111 assert(proc->leader == proc); in continue_after_vfork()
1112 assert(proc->next == NULL || proc->next->leader != proc); in continue_after_vfork()
1115 assert(proc->parent != NULL); in continue_after_vfork()
1116 assert(proc->parent->leader != NULL); in continue_after_vfork()
1118 change_process_leader(proc, proc->parent->leader); in continue_after_vfork()
1122 is_mid_stopping(struct process *proc) in is_mid_stopping() argument
1124 return proc != NULL in is_mid_stopping()
1125 && proc->event_handler != NULL in is_mid_stopping()
1126 && proc->event_handler->on_event == &process_stopping_on_event; in is_mid_stopping()
1130 continue_after_syscall(struct process *proc, int sysnum, int ret_p) in continue_after_syscall() argument
1133 if (ret_p && (is_mid_stopping(proc) || is_mid_stopping(proc->leader))) { in continue_after_syscall()
1136 proc->pid); in continue_after_syscall()
1139 continue_process(proc->pid); in continue_after_syscall()
1143 continue_after_exec(struct process *proc) in continue_after_exec() argument
1145 continue_process(proc->pid); in continue_after_exec()
1155 wait_for_proc(proc->pid); in continue_after_exec()
1156 continue_process(proc->pid); in continue_after_exec()
1175 struct process *proc = pid2proc(it->pid); in os_ltrace_exiting() local
1176 if (proc == NULL || proc->leader == NULL) in os_ltrace_exiting()
1178 if (ltrace_exiting_install_handler(proc->leader) < 0) in os_ltrace_exiting()
1181 proc->pid); in os_ltrace_exiting()
1197 umovebytes(struct process *proc, arch_addr_t addr, void *buf, size_t len) in umovebytes() argument
1208 a.a = ptrace(PTRACE_PEEKTEXT, proc->pid, addr + offset, 0); in umovebytes()
1283 linux_elf_add_plt_entry_irelative(struct process *proc, struct ltelf *lte, in linux_elf_add_plt_entry_irelative() argument
1289 int i = default_elf_add_plt_entry(proc, lte, name, rela, ndx, ret); in linux_elf_add_plt_entry_irelative()
1339 os_elf_add_func_entry(struct process *proc, struct ltelf *lte, in os_elf_add_func_entry() argument
1384 ifunc_ret_hit(struct breakpoint *bp, struct process *proc) in ifunc_ret_hit() argument
1386 struct fetch_context *fetch = fetch_arg_init(LT_TOF_FUNCTION, proc, in ifunc_ret_hit()
1396 value_init(&value, proc, NULL, type_get_voidptr(), 0); in ifunc_ret_hit()
1404 if (fetch_retval(fetch, LT_TOF_FUNCTIONR, proc, in ifunc_ret_hit()
1421 if (arch_translate_address_dyn(proc, u.a, &u.a) < 0) { in ifunc_ret_hit()
1456 if (nbp == NULL || breakpoint_init(nbp, proc, u.a, libsym) < 0) in ifunc_ret_hit()
1461 struct breakpoint *pre_bp = insert_breakpoint(proc, nbp); in ifunc_ret_hit()
1482 struct breakpoint *bp, struct process *proc) in create_ifunc_ret_bp() argument
1484 *ret = create_default_return_bp(proc); in create_ifunc_ret_bp()
1498 os_breakpoint_init(struct process *proc, struct breakpoint *bp) in os_breakpoint_init() argument