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()
1061 struct bkpt *Bp; in reset_breakpoints() local
1080 while ((Bp = bpt_hashtable[i]) != NULL) { in reset_breakpoints()
1081 bpt_hashtable[i] = Bp->next; in reset_breakpoints()
1082 if (Bp->sym_name) in reset_breakpoints()
1083 free(Bp->sym_name); in reset_breakpoints()
1084 free(Bp); in reset_breakpoints()
1117 struct bkpt *Bp; in clear_breakpoints() local
1130 for (Bp = bpt_hashtable[i]; Bp != NULL; Bp = Bp->next) { in clear_breakpoints()
1131 if (Bp->flags & BPT_ACTIVE) in clear_breakpoints()
1132 (void) Pdelbkpt(Proc, Bp->addr, Bp->instr); in clear_breakpoints()
1133 Bp->flags &= ~BPT_ACTIVE; in clear_breakpoints()
1154 struct bkpt *Bp; in reestablish_traps() local
1162 for (Bp = bpt_hashtable[i]; Bp != NULL; Bp = Bp->next) { in reestablish_traps()
1163 if ((Bp->flags & BPT_ACTIVE) && in reestablish_traps()
1164 Psetbkpt(Proc, Bp->addr, &instr) != 0) in reestablish_traps()
1165 Bp->flags &= ~BPT_ACTIVE; in reestablish_traps()
1172 struct callstack *Stk, struct dynlib *Dp, struct bkpt *Bp) in show_function_call() argument
1188 (void) printf("-> %s%s(", Dp->prt_name, Bp->sym_name); in show_function_call()
1203 struct callstack *Stk, struct dynlib *Dp, struct bkpt *Bp) in show_function_return() argument
1214 (void) printf("<- %s%s() = ", Dp->prt_name, Bp->sym_name); in show_function_return()
1245 struct bkpt *Bp; in function_trace() local
1261 if ((Bp = get_bkpt(pc)) == NULL) { in function_trace()
1270 if ((Bp->flags & (BPT_PREINIT|BPT_POSTINIT|BPT_DLACTIVITY)) && !clear) { in function_trace()
1274 if (Bp->flags & BPT_PREINIT) in function_trace()
1277 if (Bp->flags & BPT_POSTINIT) in function_trace()
1280 if (Bp->flags & BPT_DLACTIVITY) in function_trace()
1352 if ((Bp->flags & BPT_TD_CREATE) && !clear) { in function_trace()
1360 Dp = Bp->dyn; in function_trace()
1367 Bp->sym_name, (unsigned long)1); in function_trace()
1370 show_function_call(pri, NULL, Dp, Bp); in function_trace()
1371 if ((Bp->flags & BPT_HANG) && !first) in function_trace()
1376 function_entry(pri, Bp, Stk); in function_trace()
1377 if ((Bp->flags & BPT_HANG) && !first) in function_trace()
1394 active = (Bp->flags & BPT_ACTIVE); in function_trace()
1395 Bp->flags |= BPT_ACTIVE; in function_trace()
1396 instr = Bp->instr; in function_trace()
1416 if (get_bkpt(pc) != Bp) in function_trace()
1418 (void) Pdelbkpt(Proc, Bp->addr, Bp->instr); in function_trace()
1419 Bp->flags &= ~BPT_ACTIVE; in function_trace()
1426 if (get_bkpt(pc) != Bp) in function_trace()
1428 if (!active || !(Bp->flags & BPT_ACTIVE)) { in function_trace()
1429 (void) Pdelbkpt(Proc, Bp->addr, Bp->instr); in function_trace()
1430 Bp->flags &= ~BPT_ACTIVE; in function_trace()
1437 function_entry(private_t *pri, struct bkpt *Bp, struct callstack *Stk) in function_entry() argument
1442 struct dynlib *Dp = Bp->dyn; in function_entry()
1457 (!(Bp->flags & BPT_INTERNAL) && in function_entry()
1480 Stk->stack[Stk->ncall].fcn = Bp; in function_entry()
1484 add_fcall(fcall_tbl, Dp->prt_name, Bp->sym_name, in function_entry()
1487 show_function_call(pri, Stk, Dp, Bp); in function_entry()
1554 struct bkpt *Bp; in trap_one_stack() local
1601 if ((Bp = get_bkpt(pc)) == NULL || (Dp = Bp->dyn) == NULL) in trap_one_stack()
1604 if (!(Bp->flags & BPT_INTERNAL) && in trap_one_stack()
1615 Stk->stack[Stk->ncall].fcn = Bp; in trap_one_stack()
1764 struct bkpt *Bp; in return_count32() local
1772 if ((Bp = get_bkpt(pc)) != NULL && (Bp->flags & BPT_ACTIVE)) in return_count32()
1773 instr[0] = (uchar_t)Bp->instr; in return_count32()