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