Lines Matching refs:Bp
86 struct bkpt *Bp; in setup_thread_agent() local
100 (Bp = create_bkpt(notify.u.bptaddr, 0, 1)) != NULL) in setup_thread_agent()
101 Bp->flags |= BPT_TD_CREATE; in setup_thread_agent()
113 struct bkpt *Bp; in delete_breakpoints() local
120 while ((Bp = *Bpp) != NULL) { in delete_breakpoints()
121 if (Bp->addr < base || Bp->addr >= base + size) { in delete_breakpoints()
122 Bpp = &Bp->next; in delete_breakpoints()
125 *Bpp = Bp->next; in delete_breakpoints()
126 if (Bp->sym_name) in delete_breakpoints()
127 free(Bp->sym_name); in delete_breakpoints()
128 free(Bp); in delete_breakpoints()
156 struct bkpt *Bp; in establish_breakpoints() local
160 (Bp = create_bkpt(notify.u.bptaddr, 0, 1)) != NULL) in establish_breakpoints()
161 Bp->flags |= BPT_PREINIT; in establish_breakpoints()
163 (Bp = create_bkpt(notify.u.bptaddr, 0, 1)) != NULL) in establish_breakpoints()
164 Bp->flags |= BPT_POSTINIT; in establish_breakpoints()
166 (Bp = create_bkpt(notify.u.bptaddr, 0, 1)) != NULL) in establish_breakpoints()
167 Bp->flags |= BPT_DLACTIVITY; in establish_breakpoints()
414 struct bkpt *Bp; in get_bkpt() local
416 for (Bp = bpt_hashtable[bpt_hash(pc)]; Bp != NULL; Bp = Bp->next) in get_bkpt()
417 if (pc == Bp->addr) in get_bkpt()
420 return (Bp); in get_bkpt()
433 struct bkpt *Bp; in create_bkpt() local
436 for (Bp = bpt_hashtable[hix]; Bp != NULL; Bp = Bp->next) in create_bkpt()
437 if (pc == Bp->addr) in create_bkpt()
438 return (Bp); in create_bkpt()
454 Bp = my_malloc(sizeof (struct bkpt), NULL); in create_bkpt()
455 Bp->sym_name = NULL; in create_bkpt()
456 Bp->dyn = NULL; in create_bkpt()
457 Bp->addr = pc; in create_bkpt()
458 Bp->instr = 0; in create_bkpt()
459 Bp->flags = 0; in create_bkpt()
460 if (set && Psetbkpt(Proc, Bp->addr, &Bp->instr) == 0) in create_bkpt()
461 Bp->flags |= BPT_ACTIVE; in create_bkpt()
462 Bp->next = bpt_hashtable[hix]; in create_bkpt()
463 bpt_hashtable[hix] = Bp; in create_bkpt()
465 return (Bp); in create_bkpt()
475 struct bkpt *Bp; in set_deferred_breakpoints() local
482 for (Bp = bpt_hashtable[i]; Bp != NULL; Bp = Bp->next) { in set_deferred_breakpoints()
483 if (!(Bp->flags & BPT_ACTIVE)) { in set_deferred_breakpoints()
484 if (!(Bp->flags & BPT_EXCLUDE) && in set_deferred_breakpoints()
485 Psetbkpt(Proc, Bp->addr, &Bp->instr) == 0) in set_deferred_breakpoints()
486 Bp->flags |= BPT_ACTIVE; in set_deferred_breakpoints()
487 } else if (Paddr_to_text_map(Proc, Bp->addr) == NULL) { in set_deferred_breakpoints()
488 Bp->flags &= ~BPT_ACTIVE; in set_deferred_breakpoints()
500 struct bkpt *Bp; in symbol_iter() local
542 if ((Bp = create_bkpt(pc, 0, 0)) == NULL) /* can't fail */ in symbol_iter()
550 if (Bp->sym_name == NULL) { in symbol_iter()
551 Bp->sym_name = strdup(sym_name); in symbol_iter()
552 } else if (strstr(Bp->sym_name, sym_name) != NULL || in symbol_iter()
553 strlen(Bp->sym_name) > strlen(sym_name)) { in symbol_iter()
554 free(Bp->sym_name); in symbol_iter()
555 Bp->sym_name = strdup(sym_name); in symbol_iter()
557 Bp->dyn = Dp; in symbol_iter()
558 Bp->flags |= Dyp->flag; in symbol_iter()
560 Bp->flags |= BPT_EXCLUDE; in symbol_iter()
562 Bp->flags |= BPT_INTERNAL; in symbol_iter()
575 struct bkpt *Bp; in report_htable_stats() local
591 for (Bp = bpt_hashtable[i]; Bp != NULL; Bp = Bp->next) in report_htable_stats()
1067 struct bkpt *Bp; in reset_breakpoints() local
1086 while ((Bp = bpt_hashtable[i]) != NULL) { in reset_breakpoints()
1087 bpt_hashtable[i] = Bp->next; in reset_breakpoints()
1088 if (Bp->sym_name) in reset_breakpoints()
1089 free(Bp->sym_name); in reset_breakpoints()
1090 free(Bp); in reset_breakpoints()
1123 struct bkpt *Bp; in clear_breakpoints() local
1136 for (Bp = bpt_hashtable[i]; Bp != NULL; Bp = Bp->next) { in clear_breakpoints()
1137 if (Bp->flags & BPT_ACTIVE) in clear_breakpoints()
1138 (void) Pdelbkpt(Proc, Bp->addr, Bp->instr); in clear_breakpoints()
1139 Bp->flags &= ~BPT_ACTIVE; in clear_breakpoints()
1160 struct bkpt *Bp; in reestablish_traps() local
1168 for (Bp = bpt_hashtable[i]; Bp != NULL; Bp = Bp->next) { in reestablish_traps()
1169 if ((Bp->flags & BPT_ACTIVE) && in reestablish_traps()
1170 Psetbkpt(Proc, Bp->addr, &instr) != 0) in reestablish_traps()
1171 Bp->flags &= ~BPT_ACTIVE; in reestablish_traps()
1178 struct callstack *Stk, struct dynlib *Dp, struct bkpt *Bp) in show_function_call() argument
1194 (void) printf("-> %s%s(", Dp->prt_name, Bp->sym_name); in show_function_call()
1209 struct callstack *Stk, struct dynlib *Dp, struct bkpt *Bp) in show_function_return() argument
1220 (void) printf("<- %s%s() = ", Dp->prt_name, Bp->sym_name); in show_function_return()
1251 struct bkpt *Bp; in function_trace() local
1267 if ((Bp = get_bkpt(pc)) == NULL) { in function_trace()
1276 if ((Bp->flags & (BPT_PREINIT|BPT_POSTINIT|BPT_DLACTIVITY)) && !clear) { in function_trace()
1280 if (Bp->flags & BPT_PREINIT) in function_trace()
1283 if (Bp->flags & BPT_POSTINIT) in function_trace()
1286 if (Bp->flags & BPT_DLACTIVITY) in function_trace()
1358 if ((Bp->flags & BPT_TD_CREATE) && !clear) { in function_trace()
1366 Dp = Bp->dyn; in function_trace()
1373 Bp->sym_name, (unsigned long)1); in function_trace()
1376 show_function_call(pri, NULL, Dp, Bp); in function_trace()
1377 if ((Bp->flags & BPT_HANG) && !first) in function_trace()
1382 function_entry(pri, Bp, Stk); in function_trace()
1383 if ((Bp->flags & BPT_HANG) && !first) in function_trace()
1400 active = (Bp->flags & BPT_ACTIVE); in function_trace()
1401 Bp->flags |= BPT_ACTIVE; in function_trace()
1402 instr = Bp->instr; in function_trace()
1422 if (get_bkpt(pc) != Bp) in function_trace()
1424 (void) Pdelbkpt(Proc, Bp->addr, Bp->instr); in function_trace()
1425 Bp->flags &= ~BPT_ACTIVE; in function_trace()
1432 if (get_bkpt(pc) != Bp) in function_trace()
1434 if (!active || !(Bp->flags & BPT_ACTIVE)) { in function_trace()
1435 (void) Pdelbkpt(Proc, Bp->addr, Bp->instr); in function_trace()
1436 Bp->flags &= ~BPT_ACTIVE; in function_trace()
1443 function_entry(private_t *pri, struct bkpt *Bp, struct callstack *Stk) in function_entry() argument
1448 struct dynlib *Dp = Bp->dyn; in function_entry()
1465 (!(Bp->flags & BPT_INTERNAL) && in function_entry()
1488 Stk->stack[Stk->ncall].fcn = Bp; in function_entry()
1492 add_fcall(fcall_tbl, Dp->prt_name, Bp->sym_name, in function_entry()
1495 show_function_call(pri, Stk, Dp, Bp); in function_entry()
1564 struct bkpt *Bp; in trap_one_stack() local
1611 if ((Bp = get_bkpt(pc)) == NULL || (Dp = Bp->dyn) == NULL) in trap_one_stack()
1614 if (!(Bp->flags & BPT_INTERNAL) && in trap_one_stack()
1625 Stk->stack[Stk->ncall].fcn = Bp; in trap_one_stack()
1780 struct bkpt *Bp; in return_count32() local
1788 if ((Bp = get_bkpt(pc)) != NULL && (Bp->flags & BPT_ACTIVE)) in return_count32()
1789 instr[0] = (uchar_t)Bp->instr; in return_count32()