Lines Matching defs:Stk

76 #define	DEF_MAXCALL	16	/* initial value of Stk->maxcall */
574 struct callstack *Stk;
613 for (Stk = callstack; Stk != NULL; Stk = Stk->next) {
616 (ulong_t)Stk->stkbase,
617 (ulong_t)Stk->stkend,
618 (ulong_t)(Stk->stkend - Stk->stkbase));
635 struct callstack *Stk;
645 for (Stk = callstack; Stk != NULL; Stk = Stk->next)
646 if (sp >= Stk->stkbase && sp < Stk->stkend)
649 Stk = my_malloc(sizeof (struct callstack), NULL);
650 Stk->next = callstack;
651 callstack = Stk;
653 Stk->tref = 0;
654 Stk->tid = 0;
655 Stk->nthr_create = 0;
656 Stk->ncall = 0;
657 Stk->maxcall = DEF_MAXCALL;
658 Stk->stack = my_malloc(DEF_MAXCALL * sizeof (*Stk->stack), NULL);
662 Stk->stkbase = Psp->pr_stkbase;
663 Stk->stkend = Stk->stkbase + Psp->pr_stksize;
672 Stk->stkbase = (uintptr_t)Lsp->pr_altstack.ss_sp;
673 Stk->stkend = Stk->stkbase + Lsp->pr_altstack.ss_size;
684 Stk->stkend = (uintptr_t)thrinfo.ti_stkbase;
685 Stk->stkbase = Stk->stkend - thrinfo.ti_stksize;
693 Stk->stkbase = Pmap->pr_vaddr;
694 Stk->stkend = Pmap->pr_vaddr + Pmap->pr_size;
699 callstack = Stk->next;
701 free(Stk->stack);
702 free(Stk);
711 struct callstack *Stk;
719 for (Stk = callstack; Stk != NULL; Stk = Stk->next)
720 if (sp >= Stk->stkbase && sp < Stk->stkend)
723 Stk = my_malloc(sizeof (struct callstack), NULL);
724 Stk->next = callstack;
725 callstack = Stk;
727 Stk->tref = 0;
728 Stk->tid = 0;
729 Stk->nthr_create = 0;
730 Stk->ncall = 0;
731 Stk->maxcall = DEF_MAXCALL;
732 Stk->stack = my_malloc(DEF_MAXCALL * sizeof (*Stk->stack), NULL);
736 Stk->stkbase = Psp->pr_stkbase;
737 Stk->stkend = Stk->stkbase + Psp->pr_stksize;
745 Stk->stkend = (uintptr_t)thrinfo.ti_stkbase;
746 Stk->stkbase = Stk->stkend - thrinfo.ti_stksize;
750 callstack = Stk->next;
752 free(Stk->stack);
753 free(Stk);
766 struct callstack *Stk = NULL;
789 Stk = my_malloc(sizeof (struct callstack), NULL);
790 Stk->next = callstack;
791 callstack = Stk;
793 Stk->stkbase = pmap->pr_vaddr;
794 Stk->stkend = pmap->pr_vaddr + pmap->pr_size;
795 Stk->tref = 0;
796 Stk->tid = 0;
797 Stk->nthr_create = 0;
798 Stk->ncall = 0;
799 Stk->maxcall = DEF_MAXCALL;
800 Stk->stack = my_malloc(
801 DEF_MAXCALL * sizeof (*Stk->stack), NULL);
807 return (Stk);
824 struct callstack *Stk = NULL;
831 Stk = my_malloc(sizeof (struct callstack), NULL);
832 Stk->next = callstack;
833 callstack = Stk;
835 Stk->stkbase = Psp->pr_stkbase;
836 Stk->stkend = Stk->stkbase + Psp->pr_stksize;
837 Stk->tref = 0;
838 Stk->tid = 0;
839 Stk->nthr_create = 0;
840 Stk->ncall = 0;
841 Stk->maxcall = DEF_MAXCALL;
842 Stk->stack = my_malloc(DEF_MAXCALL * sizeof (*Stk->stack),
844 return (Stk);
852 Stk = my_malloc(sizeof (struct callstack), NULL);
853 Stk->next = callstack;
854 callstack = Stk;
856 Stk->stkbase = (uintptr_t)Lsp->pr_altstack.ss_sp;
857 Stk->stkend = Stk->stkbase + Lsp->pr_altstack.ss_size;
858 Stk->tref = 0;
859 Stk->tid = 0;
860 Stk->nthr_create = 0;
861 Stk->ncall = 0;
862 Stk->maxcall = DEF_MAXCALL;
863 Stk->stack = my_malloc(DEF_MAXCALL * sizeof (*Stk->stack),
865 return (Stk);
892 Stk = my_malloc(sizeof (struct callstack), NULL);
893 Stk->next = callstack;
894 callstack = Stk;
897 Stk->stkend = (uintptr_t)thrinfo.ti_stkbase;
898 Stk->stkbase = Stk->stkend - thrinfo.ti_stksize;
899 Stk->tref = tref;
900 Stk->tid = thrinfo.ti_tid;
901 Stk->nthr_create = nthr_create;
902 Stk->ncall = 0;
903 Stk->maxcall = DEF_MAXCALL;
904 Stk->stack = my_malloc(DEF_MAXCALL * sizeof (*Stk->stack),
906 return (Stk);
924 get_tid(struct callstack *Stk)
942 Stk->tref = 0;
943 Stk->tid = 0;
944 Stk->nthr_create = 0;
955 if (tref == Stk->tref && Stk->nthr_create == nthr_create)
964 Stk->tref = 0;
965 Stk->tid = 0;
966 Stk->nthr_create = 0;
973 Stk->tref = 0;
974 Stk->tid = 0;
975 Stk->nthr_create = 0;
977 Stk->tref = tref;
978 Stk->tid = thrinfo.ti_tid;
979 Stk->nthr_create = nthr_create;
986 struct callstack *Stk;
993 for (Stk = callstack; Stk != NULL; Stk = Stk->next)
994 if (sp >= Stk->stkbase && sp < Stk->stkend)
1000 if (Stk == NULL) {
1024 while (Stk == NULL && fp != 0 && fp >= sp) {
1026 for (Stk = callstack; Stk != NULL; Stk = Stk->next)
1027 if ((fp >= Stk->stkbase && fp < Stk->stkend) ||
1028 (stkend > Stk->stkbase &&
1029 stkend <= Stk->stkend))
1031 if (Stk == NULL)
1035 if (Stk != NULL) /* the stack grew */
1036 Stk->stkbase = stkbase;
1039 if (Stk == NULL && makeid) /* new stack */
1040 Stk = find_stack(sp);
1042 if (Stk == NULL)
1048 if (Stk->ncall == Stk->maxcall) {
1049 Stk->maxcall *= 2;
1050 Stk->stack = my_realloc(Stk->stack,
1051 Stk->maxcall * sizeof (*Stk->stack), NULL);
1055 get_tid(Stk);
1057 return (Stk);
1068 struct callstack *Stk;
1096 while ((Stk = callstack) != NULL) {
1097 callstack = Stk->next;
1098 free(Stk->stack);
1099 free(Stk);
1178 struct callstack *Stk, struct dynlib *Dp, struct bkpt *Bp)
1185 make_pname(pri, (Stk != NULL)? Stk->tid : 0);
1188 if (Stk != NULL) {
1189 for (i = 1; i < Stk->ncall; i++) {
1209 struct callstack *Stk, struct dynlib *Dp, struct bkpt *Bp)
1213 make_pname(pri, Stk->tid);
1216 for (i = 0; i < Stk->ncall; i++) {
1253 struct callstack *Stk;
1369 if ((Stk = callstack_info(sp, fp, 1)) == NULL) {
1382 function_entry(pri, Bp, Stk);
1386 function_return(pri, Stk);
1443 function_entry(private_t *pri, struct bkpt *Bp, struct callstack *Stk)
1464 if (!(sp >= Stk->stkbase && sp < Stk->stkend) ||
1469 for (i = 0; i < Stk->ncall; i++) {
1470 if (sp >= Stk->stack[i].sp) {
1471 Stk->ncall = i;
1472 if (sp == Stk->stack[i].sp)
1486 Stk->stack[Stk->ncall].sp = sp; /* record it anyeay */
1487 Stk->stack[Stk->ncall].pc = rpc;
1488 Stk->stack[Stk->ncall].fcn = Bp;
1490 Stk->ncall++;
1495 show_function_call(pri, Stk, Dp, Bp);
1505 function_return(private_t *pri, struct callstack *Stk)
1522 for (i = Stk->ncall - 1; i >= 0; i--) {
1523 if (sp <= Stk->stack[i].sp && fp > Stk->stack[i].sp) {
1524 Stk->ncall = i;
1535 for (i = Stk->ncall - 1; i >= 0; i--) {
1536 if (sp <= Stk->stack[i].sp &&
1537 fp > Stk->stack[i].sp) {
1538 Stk->ncall = i;
1548 Stk, Stk->stack[i].fcn->dyn, Stk->stack[i].fcn);
1565 struct callstack *Stk;
1619 if ((Stk = callstack_info(sp, fp, 0)) == NULL)
1623 Stk->stack[Stk->ncall].sp = sp;
1624 Stk->stack[Stk->ncall].pc = rpc;
1625 Stk->stack[Stk->ncall].fcn = Bp;
1626 Stk->ncall++;