1*40471Sbill /* trap.h 1.3 87/07/11 */ 2*40471Sbill 3*40471Sbill /* 4*40471Sbill * Trap type values 5*40471Sbill * also known in trap.c for name strings 6*40471Sbill */ 7*40471Sbill 8*40471Sbill #define T_RESADFLT 0 /* reserved addressing */ 9*40471Sbill #define T_PRIVINFLT 1 /* privileged instruction */ 10*40471Sbill #define T_RESOPFLT 2 /* reserved operand */ 11*40471Sbill #define T_BPTFLT 3 /* breakpoint instruction */ 12*40471Sbill #define T_SYSCALL 5 /* system call (kcall) */ 13*40471Sbill #define T_ARITHTRAP 6 /* arithmetic trap */ 14*40471Sbill #define T_ASTFLT 7 /* system forced exception */ 15*40471Sbill #define T_SEGFLT 8 /* segmentation (limit) fault */ 16*40471Sbill #define T_PROTFLT 9 /* protection fault */ 17*40471Sbill #define T_TRCTRAP 10 /* trace trap */ 18*40471Sbill #define T_PAGEFLT 12 /* page fault */ 19*40471Sbill #define T_TABLEFLT 13 /* page table fault */ 20*40471Sbill #define T_ALIGNFLT 14 /* alignment fault */ 21*40471Sbill #define T_KSPNOTVAL 15 /* kernel stack pointer not valid */ 22*40471Sbill #define T_BUSERR 16 /* bus error */ 23*40471Sbill #define T_KDBTRAP 17 /* kernel debugger trap */ 24*40471Sbill #define T_DIVIDE 18 /* integer divide fault */ 25*40471Sbill #define T_DEBUG 19 /* debug fault/trap catchall */ 26*40471Sbill #define T_NMI 20 /* non-maskable trap */ 27*40471Sbill #define T_OFLOW 21 /* overflow trap */ 28*40471Sbill #define T_BOUND 22 /* bound instruction fault */ 29*40471Sbill #define T_DNA 23 /* device not available fault */ 30*40471Sbill #define T_DOUBLEFLT 24 /* double fault */ 31*40471Sbill #define T_FPOPFLT 25 /* fp coprocessor operand fetch fault */ 32*40471Sbill #define T_TSSFLT 26 /* invalid tss fault */ 33*40471Sbill #define T_SEGNPFLT 27 /* segment not present fault */ 34*40471Sbill #define T_STKFLT 28 /* stack fault */ 35*40471Sbill #define T_RESERVED 29 /* stack fault */ 36*40471Sbill 37*40471Sbill /* definitions for <sys/signal.h> */ 38*40471Sbill #define ILL_RESAD_FAULT T_RESADFLT 39*40471Sbill #define ILL_PRIVIN_FAULT T_PRIVINFLT 40*40471Sbill #define ILL_RESOP_FAULT T_RESOPFLT 41*40471Sbill #define ILL_ALIGN_FAULT T_ALIGNFLT 42*40471Sbill 43*40471Sbill /* codes for SIGFPE/ARITHTRAP */ 44*40471Sbill #define FPE_INTOVF_TRAP 0x1 /* integer overflow */ 45*40471Sbill #define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ 46*40471Sbill #define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ 47*40471Sbill #define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ 48*40471Sbill #define FPE_FLTUND_TRAP 0x5 /* floating underflow */ 49