static void call_info_from_context(struct call_info *info, os_context_t *context) { unsigned long pc; info->interrupted = 1; if (lowtag_of(*os_context_register_addr(context, reg_CODE)) == FUN_POINTER_LOWTAG) { /* We tried to call a function, but crapped out before $CODE could * be fixed up. Probably an undefined function. */ info->frame = (struct call_frame *)(unsigned long) (*os_context_register_addr(context, reg_OCFP)); info->lra = (lispobj)(*os_context_register_addr(context, reg_LRA)); info->code = code_pointer(info->lra); pc = (unsigned long)native_pointer(info->lra); } else { info->frame = (struct call_frame *)(unsigned long) (*os_context_register_addr(context, reg_CFP)); info->code = code_pointer(*os_context_register_addr(context, reg_CODE)); info->lra = NIL; pc = *os_context_pc_addr(context); } if (info->code != NULL) info->pc = pc - (unsigned long) info->code - #ifndef LISP_FEATURE_ALPHA (HEADER_LENGTH(info->code->header) * sizeof(lispobj)); #else (HEADER_LENGTH(((struct code *)info->code)->header) * sizeof(lispobj)); #endif else
static void info_from_sigcontext(struct call_info *info, os_context_t * csp) { unsigned long pc; info->interrupted = 1; if (LowtagOf(SC_REG(csp, reg_CODE)) == type_FunctionPointer) { /* We tried to call a function, but crapped out before $CODE could be fixed up. Probably an undefined function. */ info->frame = (struct call_frame *) SC_REG(csp, reg_OCFP); info->lra = (lispobj) SC_REG(csp, reg_LRA); info->code = code_pointer(info->lra); pc = (unsigned long) PTR(info->lra); } else { info->frame = (struct call_frame *) SC_REG(csp, reg_CFP); info->code = code_pointer(SC_REG(csp, reg_CODE)); info->lra = NIL; pc = SC_PC(csp); } if (info->code != NULL) info->pc = pc - (unsigned long) info->code - #ifndef alpha (HEADER_LENGTH(info->code->header) * sizeof(lispobj)); #else (HEADER_LENGTH(((struct code *) info->code)->header) * sizeof(lispobj)); #endif else