Lines Matching refs:proc

31 #include "proc.h"
197 arch_dynlink_done(struct process *proc)
201 while ((libsym = proc_each_symbol(proc, libsym,
203 if (proc_read_64(proc, libsym->enter_addr,
212 if (proc->e_machine == EM_PPC)
215 if (proc_activate_delayed_symbol(proc, libsym) < 0)
218 if (proc->e_machine == EM_PPC)
284 arch_translate_address_dyn(struct process *proc,
287 if (proc->e_machine == EM_PPC64) {
289 if (proc_read_64(proc, addr, &value) < 0) {
351 sym2addr(struct process *proc, struct library_symbol *sym)
593 read_plt_slot_value(struct process *proc, GElf_Addr addr, GElf_Addr *valp)
601 if (proc_read_64(proc, (arch_addr_t)(uintptr_t)addr, &l) < 0) {
612 unresolve_plt_slot(struct process *proc, GElf_Addr addr, GElf_Addr value)
618 if (ptrace(PTRACE_POKETEXT, proc->pid, addr, value) < 0) {
627 arch_elf_add_func_entry(struct process *proc, struct ltelf *lte,
665 if (elf_add_plt_entry(proc, lte, name, rela,
691 arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte,
714 if (default_elf_add_plt_entry(proc, lte, name, rela, ndx,
765 if (read_plt_slot_value(proc, plt_slot_addr, &plt_slot_value) < 0)
825 dl_plt_update_bp_on_hit(struct breakpoint *bp, struct process *proc)
828 proc->pid, breakpoint_name(bp), bp->addr);
829 struct process_stopping_handler *self = proc->arch.handler;
834 if (read_plt_slot_value(proc, libsym->arch.plt_slot_addr, &value) < 0)
838 if (proc->e_machine == EM_PPC64)
839 unresolve_plt_slot(proc, libsym->arch.plt_slot_addr,
847 proc->arch.handler = NULL;
849 breakpoint_turn_off(bp, proc);
865 struct process *proc = self->task_enabling_breakpoint;
869 if (read_plt_slot_value(proc, libsym->arch.plt_slot_addr, &value) < 0)
878 proc->pid, value);
882 if (proc->e_machine == EM_PPC64
883 && unresolve_plt_slot(proc, libsym->arch.plt_slot_addr,
906 if (proc->e_machine == EM_PPC)
912 struct process *leader = proc->leader;
919 arch_addr_t addr = get_instruction_pointer(proc) + 4;
920 leader->arch.dl_plt_update_bp = insert_breakpoint_at(proc, addr, NULL);
931 breakpoint_turn_off(leader->arch.dl_plt_update_bp, proc);
940 jump_to_entry_point(struct process *proc, struct breakpoint *bp)
946 set_instruction_pointer(proc, rv);
950 ppc_plt_bp_continue(struct breakpoint *bp, struct process *proc)
968 assert(proc->e_machine == EM_PPC);
977 leader = proc->leader;
981 proc) >= 0)
987 (proc, bp, on_all_stopped, keep_stepping_p, NULL) < 0) {
990 continue_after_breakpoint(proc, bp);
995 if (proc->e_machine == EM_PPC) {
996 continue_after_breakpoint(proc, bp);
1000 jump_to_entry_point(proc, bp);
1001 continue_process(proc->pid);
1043 ppc_plt_bp_retract(struct breakpoint *bp, struct process *proc)
1048 if (proc->e_machine == EM_PPC64
1051 each_task(proc->leader, NULL, detach_task_cb, bp);
1052 unresolve_plt_slot(proc, bp->libsym->arch.plt_slot_addr,
1058 ppc_plt_bp_install(struct breakpoint *bp, struct process *proc)
1084 if (unresolve_plt_slot(proc, plt_slot_addr,
1096 proc_remove_breakpoint(proc, bp);
1152 arch_breakpoint_init(struct process *proc, struct breakpoint *bp)
1161 if (proc->e_machine == EM_PPC
1166 if (proc->e_machine == EM_PPC64
1200 arch_process_init(struct process *proc)
1202 proc->arch.dl_plt_update_bp = NULL;
1203 proc->arch.handler = NULL;
1208 arch_process_destroy(struct process *proc)
1213 arch_process_clone(struct process *retp, struct process *proc)
1215 retp->arch = proc->arch;
1232 arch_process_exec(struct process *proc)
1234 return arch_process_init(proc);