Changeset 62baed17 in mainline for kernel/arch/ia32/src/interrupt.c
- Timestamp:
- 2010-06-26T12:00:12Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 38e5675b
- Parents:
- 8e374ea7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/interrupt.c
r8e374ea7 r62baed17 65 65 void decode_istate(istate_t *istate) 66 66 { 67 const char *symbol = symtab_fmt_name_lookup(istate->eip); 68 69 if (CPU) 70 printf("----------------EXCEPTION OCCURED (cpu%u)----------------\n", CPU->id); 71 else 72 printf("----------------EXCEPTION OCCURED----------------\n"); 73 74 printf("%%eip: %#lx (%s)\n", istate->eip, symbol); 75 printf("ERROR_WORD=%#lx\n", istate->error_word); 76 printf("%%cs=%#lx,flags=%#lx\n", istate->cs, istate->eflags); 77 printf("%%eax=%#lx, %%ecx=%#lx, %%edx=%#lx, %%esp=%p\n", istate->eax, istate->ecx, istate->edx, &istate->stack[0]); 78 printf("stack: %#lx, %#lx, %#lx, %#lx\n", istate->stack[0], istate->stack[1], istate->stack[2], istate->stack[3]); 79 printf(" %#lx, %#lx, %#lx, %#lx\n", istate->stack[4], istate->stack[5], istate->stack[6], istate->stack[7]); 80 81 stack_trace_istate(istate); 67 printf("error_word=%#lx\n", istate->error_word); 68 printf("cs =%#0.8lx\teflags=%#0.8lx\n", istate->cs, istate->eflags); 69 printf("eax=%#0.8lx\tecx=%#0.8lx\tedx=%#0.8lx\n", 70 istate->eax, istate->ecx, istate->edx); 82 71 } 83 72 … … 94 83 { 95 84 fault_if_from_uspace(istate, "Unserviced interrupt: %u.", n); 96 97 decode_istate(istate); 98 panic("Unserviced interrupt: %u.", n); 85 panic_badtrap(istate, n, "Unserviced interrupt: %u.", n); 99 86 } 100 87 … … 102 89 { 103 90 fault_if_from_uspace(istate, "Divide error."); 104 105 decode_istate(istate); 106 panic("Divide error."); 91 panic_badtrap(istate, n, "Divide error."); 107 92 } 108 93 … … 128 113 fault_if_from_uspace(istate, "General protection fault."); 129 114 } 130 131 decode_istate(istate); 132 panic("General protection fault."); 115 panic_badtrap(istate, n, "General protection fault."); 133 116 } 134 117 … … 136 119 { 137 120 fault_if_from_uspace(istate, "Stack fault."); 138 139 decode_istate(istate); 140 panic("Stack fault."); 121 panic_badtrap(istate, n, "Stack fault."); 141 122 } 142 123 … … 149 130 ); 150 131 151 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR : %#zx.",132 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR=%#0.8x.", 152 133 (unative_t) mxcsr); 153 154 decode_istate(istate); 155 printf("MXCSR: %#lx\n", mxcsr); 156 panic("SIMD FP exception(19)."); 134 panic_badtrap(istate, n, "SIMD FP exception, MXCSR=%#0.8x"); 157 135 } 158 136 … … 164 142 #else 165 143 fault_if_from_uspace(istate, "FPU fault."); 166 panic ("FPU fault.");144 panic_badtrap(istate, n, "FPU fault."); 167 145 #endif 168 146 }
Note:
See TracChangeset
for help on using the changeset viewer.