Lines Matching refs:ph

64 set_breakpoint(struct ps_prochandle *ph, ulong_t addr, unsigned flags)  in set_breakpoint()  argument
68 for (cur = ph->pp_breakpoints, prev = NULL; in set_breakpoint()
87 new->bl_next = ph->pp_breakpoints; in set_breakpoint()
88 ph->pp_breakpoints = new; in set_breakpoint()
98 find_bp(struct ps_prochandle *ph, ulong_t addr) in find_bp() argument
102 for (cur = ph->pp_breakpoints; in find_bp()
113 delete_bp(struct ps_prochandle *ph, ulong_t addr) in delete_bp() argument
117 for (cur = ph->pp_breakpoints, prev = NULL; in delete_bp()
125 ph->pp_breakpoints = cur->bl_next; in delete_bp()
134 list_breakpoints(struct ps_prochandle *ph) in list_breakpoints() argument
138 if (ph->pp_breakpoints == NULL) { in list_breakpoints()
144 for (cur = ph->pp_breakpoints; cur; cur = cur->bl_next) { in list_breakpoints()
146 cur->bl_flags, print_address_ps(ph, cur->bl_addr, in list_breakpoints()
152 set_breaks(struct ps_prochandle *ph) in set_breaks() argument
157 for (cur = ph->pp_breakpoints; cur; cur = cur->bl_next) { in set_breaks()
160 if (ps_pread(ph, cur->bl_addr, (char *)&old_inst, in set_breaks()
166 if (ps_pwrite(ph, cur->bl_addr, (char *)&bpt_instr, in set_breaks()
174 clear_breaks(struct ps_prochandle *ph) in clear_breaks() argument
181 for (cur = ph->pp_breakpoints; cur; cur = cur->bl_next) in clear_breaks()
182 if (ps_pwrite(ph, cur->bl_addr, (char *)&(cur->bl_instr), in clear_breaks()
188 delete_all_breakpoints(struct ps_prochandle *ph) in delete_all_breakpoints() argument
192 if (ph->pp_breakpoints == NULL) in delete_all_breakpoints()
195 for (prev = NULL, cur = ph->pp_breakpoints; in delete_all_breakpoints()
202 ph->pp_breakpoints = NULL; in delete_all_breakpoints()
207 delete_breakpoint(struct ps_prochandle *ph, ulong_t addr, unsigned flags) in delete_breakpoint() argument
211 if (((bpt = find_bp(ph, addr)) == (bptlist_t *)-1) || in delete_breakpoint()
219 return (delete_bp(ph, addr)); in delete_breakpoint()
223 handle_sp_break(struct ps_prochandle *ph) in handle_sp_break() argument
227 if (rd_event_getmsg(ph->pp_rap, &emt) != RD_OK) { in handle_sp_break()
234 ph->pp_flags |= FLG_PP_LMAPS; in handle_sp_break()
236 ph->pp_flags &= ~FLG_PP_LMAPS; in handle_sp_break()
270 continue_to_break(struct ps_prochandle *ph) in continue_to_break() argument
282 (void) step_n(ph, 1, FLG_SN_NONE); in continue_to_break()
297 set_breaks(ph); in continue_to_break()
316 if (writev(ph->pp_ctlfd, piov, 5) == -1) { in continue_to_break()
318 ph->pp_flags &= ~FLG_PP_PACT; in continue_to_break()
320 (void) ps_close(ph); in continue_to_break()
327 if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus), 0) == -1) in continue_to_break()
349 if (writev(ph->pp_ctlfd, piov, 1) == -1) in continue_to_break()
352 if ((bpt = find_bp(ph, pstatus.pr_lwp.pr_reg[R_PC])) == in continue_to_break()
360 clear_breaks(ph); in continue_to_break()
368 (void) step_n(ph, 1, FLG_SN_NONE); in continue_to_break()
376 handle_sp_break(ph); in continue_to_break()
378 if (ph->pp_flags & FLG_PP_LMAPS) { in continue_to_break()
379 if (get_linkmaps(ph) != RET_OK) in continue_to_break()
387 is_plt(struct ps_prochandle *ph, ulong_t pc) in is_plt() argument
392 if ((mip = addr_to_map(ph, pc)) == (map_info_t *)0) in is_plt()
406 step_n(struct ps_prochandle *ph, size_t count, sn_flags_e flgs) in step_n() argument
415 if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus), 0) == -1) in step_n()
432 if ((bpt = find_bp(ph, pc)) != (bptlist_t *)-1) { in step_n()
434 handle_sp_break(ph); in step_n()
438 disasm(ph, 1); in step_n()
444 if (writev(ph->pp_ctlfd, piov, 2) == -1) in step_n()
450 if (writev(ph->pp_ctlfd, piov, 2) == -1) in step_n()
454 if (writev(ph->pp_ctlfd, piov, 1) == -1) in step_n()
457 if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus), 0) == -1) in step_n()
471 ((pltbase = is_plt(ph, pc)) != (ulong_t)0)) { in step_n()
473 if (rd_plt_resolution(ph->pp_rap, pc, in step_n()
482 (void) set_breakpoint(ph, rp.pi_target, in step_n()
484 bpflags = continue_to_break(ph); in step_n()
486 (void) delete_breakpoint(ph, rp.pi_target, in step_n()
490 (void) step_n(ph, rp.pi_nstep, in step_n()
493 (void) step_n(ph, rp.pi_nstep, FLG_SN_NONE); in step_n()
498 if (writev(ph->pp_ctlfd, piov, 1) == -1) in step_n()
501 if ((flgs & FLG_SN_VERBOSE) && (ph->pp_flags & FLG_PP_LMAPS)) { in step_n()
502 if (get_linkmaps(ph) != RET_OK) in step_n()
510 step_to_addr(struct ps_prochandle *ph, ulong_t addr) in step_to_addr() argument
516 if (read(ph->pp_statusfd, &pstat, sizeof (pstat)) == -1) in step_to_addr()
522 (void) step_n(ph, 1, FLG_SN_NONE); in step_to_addr()
523 if (read(ph->pp_statusfd, &pstat, sizeof (pstat)) == -1) in step_to_addr()
528 disasm(ph, 1); in step_to_addr()