Lines Matching refs:proc
45 arch_translate_address_dyn(struct process *proc, in arch_translate_address_dyn() argument
63 breakpoint_on_hit(struct breakpoint *bp, struct process *proc) in breakpoint_on_hit() argument
67 (bp->cbs->on_hit)(bp, proc); in breakpoint_on_hit()
71 breakpoint_on_continue(struct breakpoint *bp, struct process *proc) in breakpoint_on_continue() argument
75 (bp->cbs->on_continue)(bp, proc); in breakpoint_on_continue()
77 continue_after_breakpoint(proc, bp); in breakpoint_on_continue()
81 breakpoint_on_retract(struct breakpoint *bp, struct process *proc) in breakpoint_on_retract() argument
85 (bp->cbs->on_retract)(bp, proc); in breakpoint_on_retract()
89 breakpoint_on_install(struct breakpoint *bp, struct process *proc) in breakpoint_on_install() argument
93 (bp->cbs->on_install)(bp, proc); in breakpoint_on_install()
98 struct breakpoint *bp, struct process *proc) in breakpoint_get_return_bp() argument
102 return (bp->cbs->get_return_bp)(ret, bp, proc); in breakpoint_get_return_bp()
104 if ((*ret = create_default_return_bp(proc)) == NULL) in breakpoint_get_return_bp()
113 address2bpstruct(struct process *proc, arch_addr_t addr) in address2bpstruct() argument
115 assert(proc != NULL); in address2bpstruct()
116 assert(proc->breakpoints != NULL); in address2bpstruct()
117 assert(proc->leader == proc); in address2bpstruct()
118 debug(DEBUG_FUNCTION, "address2bpstruct(pid=%d, addr=%p)", proc->pid, addr); in address2bpstruct()
121 if (DICT_FIND_VAL(proc->breakpoints, &addr, &found) < 0) in address2bpstruct()
128 os_breakpoint_init(struct process *proc, struct breakpoint *sbp) in os_breakpoint_init() argument
147 arch_breakpoint_init(struct process *proc, struct breakpoint *sbp) in arch_breakpoint_init() argument
180 breakpoint_init(struct breakpoint *bp, struct process *proc, in breakpoint_init() argument
184 if (os_breakpoint_init(proc, bp) < 0) in breakpoint_init()
186 if (arch_breakpoint_init(proc, bp) < 0) { in breakpoint_init()
234 breakpoint_turn_on(struct breakpoint *bp, struct process *proc) in breakpoint_turn_on() argument
238 assert(proc->pid != 0); in breakpoint_turn_on()
239 enable_breakpoint(proc, bp); in breakpoint_turn_on()
240 breakpoint_on_install(bp, proc); in breakpoint_turn_on()
246 breakpoint_turn_off(struct breakpoint *bp, struct process *proc) in breakpoint_turn_off() argument
250 disable_breakpoint(proc, bp); in breakpoint_turn_off()
256 create_default_return_bp(struct process *proc) in create_default_return_bp() argument
259 arch_addr_t return_addr = get_return_addr(proc, proc->stack_pointer); in create_default_return_bp()
261 || breakpoint_init(bp, proc, return_addr, NULL) < 0) { in create_default_return_bp()
269 insert_breakpoint_at(struct process *proc, arch_addr_t addr, in insert_breakpoint_at() argument
274 proc->pid, addr, libsym ? libsym->name : "NULL"); in insert_breakpoint_at()
279 if (bp == NULL || breakpoint_init(bp, proc, addr, libsym) < 0) { in insert_breakpoint_at()
292 struct breakpoint *tmp = insert_breakpoint(proc, bp); in insert_breakpoint_at()
301 insert_breakpoint(struct process *proc, struct breakpoint *bp) in insert_breakpoint() argument
305 struct process *leader = proc->leader; in insert_breakpoint()
323 if (breakpoint_turn_on(ext_bp, proc) < 0) { in insert_breakpoint()
333 delete_breakpoint_at(struct process *proc, arch_addr_t addr) in delete_breakpoint_at() argument
336 proc->pid, addr); in delete_breakpoint_at()
338 struct process *leader = proc->leader; in delete_breakpoint_at()
345 if (delete_breakpoint(proc, bp) < 0) { in delete_breakpoint_at()
352 delete_breakpoint(struct process *proc, struct breakpoint *bp) in delete_breakpoint() argument
354 struct process *leader = proc->leader; in delete_breakpoint()
357 if (breakpoint_turn_off(bp, proc) < 0) in delete_breakpoint()
386 struct process *proc = data; in disable_bp_cb() local
387 debug(DEBUG_FUNCTION, "disable_bp_cb(pid=%d)", proc->pid); in disable_bp_cb()
389 disable_breakpoint(proc, *bpp); in disable_bp_cb()
394 disable_all_breakpoints(struct process *proc) in disable_all_breakpoints() argument
396 debug(DEBUG_FUNCTION, "disable_all_breakpoints(pid=%d)", proc->pid); in disable_all_breakpoints()
397 assert(proc->leader == proc); in disable_all_breakpoints()
398 DICT_EACH(proc->breakpoints, arch_addr_t, struct breakpoint *, in disable_all_breakpoints()
399 NULL, disable_bp_cb, proc); in disable_all_breakpoints()
403 entry_breakpoint_on_hit(struct breakpoint *bp, struct process *proc) in entry_breakpoint_on_hit() argument
405 if (proc == NULL || proc->leader == NULL) in entry_breakpoint_on_hit()
407 delete_breakpoint_at(proc, bp->addr); in entry_breakpoint_on_hit()
408 process_hit_start(proc); in entry_breakpoint_on_hit()
412 entry_breakpoint_init(struct process *proc, in entry_breakpoint_init() argument
417 int err = breakpoint_init(bp, proc, addr, NULL); in entry_breakpoint_init()
429 breakpoints_init(struct process *proc) in breakpoints_init() argument
431 debug(DEBUG_FUNCTION, "breakpoints_init(pid=%d)", proc->pid); in breakpoints_init()
435 assert(proc->breakpoints != NULL); in breakpoints_init()
438 assert(proc->leader == proc); in breakpoints_init()
442 assert(proc->filename != NULL); in breakpoints_init()
444 struct library *lib = ltelf_read_main_binary(proc, proc->filename); in breakpoints_init()
452 proc_remove_library(proc, lib); in breakpoints_init()
453 proc_remove_breakpoint(proc, entry_bp); in breakpoints_init()
465 || (entry_breakpoint_init(proc, entry_bp, in breakpoints_init()
469 "Some tracing events may be missed.\n", proc->pid); in breakpoints_init()
475 if ((result = proc_add_breakpoint(proc, entry_bp)) < 0) in breakpoints_init()
479 if ((result = breakpoint_turn_on(entry_bp, proc)) < 0) in breakpoints_init()
482 proc_add_library(proc, lib); in breakpoints_init()
484 proc->callstack_depth = 0; in breakpoints_init()