static void trap_fatal(struct trapframe *frame) { printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR)); #ifdef KDB if ((debugger_on_panic || kdb_active) && kdb_trap(frame->exc, 0, frame)) return; #endif panic("%s trap", trapname(frame->exc)); }
__dead void panictrap(int type, struct trapframe *frame) { static int panicing = 0; if (panicing++ == 0) printtrap(type, frame); if ((u_int)type < trap_types) panic(trap_type[type]); else panic("trap %d", type); /*NOTREACHED*/ }