Changes in kernel/arch/ia32/src/interrupt.c [214ec25c:c9eb31c2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/interrupt.c
r214ec25c rc9eb31c2 63 63 void (* eoi_function)(void) = NULL; 64 64 65 void decode_istate(istate_t *istate) 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); 65 void istate_decode(istate_t *istate) 66 { 67 printf("error_word=%p\n", istate->error_word); 68 printf("eflags=%p\n", istate->eflags); 69 70 printf("cs =%p\tds =%p\tes =%p\n", istate->cs, istate->ds, istate->es); 71 printf("fs =%p\tgs =%p", istate->fs, istate->gs); 72 if (istate_from_uspace(istate)) 73 printf("\tss =%p\n", istate->ss); 74 else 75 printf("\n"); 76 77 printf("eax=%p\tebx=%p\tecx=%p\n", istate->eax, istate->ebx, 78 istate->ecx); 79 printf("edx=%p\tedi=%p\tesi=%p\n", istate->edx, istate->edi, 80 istate->esi); 81 printf("ebp=%p\tesp=%p\teip=%p\n", istate->ebp, 82 istate_from_uspace(istate) ? istate->esp : (uintptr_t) &istate->esp, 83 istate->eip); 82 84 } 83 85 … … 94 96 { 95 97 fault_if_from_uspace(istate, "Unserviced interrupt: %u.", n); 96 97 decode_istate(istate); 98 panic("Unserviced interrupt: %u.", n); 98 panic_badtrap(istate, n, "Unserviced interrupt: %u.", n); 99 99 } 100 100 … … 102 102 { 103 103 fault_if_from_uspace(istate, "Divide error."); 104 105 decode_istate(istate); 106 panic("Divide error."); 104 panic_badtrap(istate, n, "Divide error."); 107 105 } 108 106 … … 128 126 fault_if_from_uspace(istate, "General protection fault."); 129 127 } 130 131 decode_istate(istate); 132 panic("General protection fault."); 128 panic_badtrap(istate, n, "General protection fault."); 133 129 } 134 130 … … 136 132 { 137 133 fault_if_from_uspace(istate, "Stack fault."); 138 139 decode_istate(istate); 140 panic("Stack fault."); 134 panic_badtrap(istate, n, "Stack fault."); 141 135 } 142 136 … … 149 143 ); 150 144 151 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR : %#zx.",145 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR=%#0.8x.", 152 146 (unative_t) mxcsr); 153 154 decode_istate(istate); 155 printf("MXCSR: %#lx\n", mxcsr); 156 panic("SIMD FP exception(19)."); 147 panic_badtrap(istate, n, "SIMD FP exception, MXCSR=%#0.8x"); 157 148 } 158 149 … … 164 155 #else 165 156 fault_if_from_uspace(istate, "FPU fault."); 166 panic ("FPU fault.");157 panic_badtrap(istate, n, "FPU fault."); 167 158 #endif 168 159 }
Note:
See TracChangeset
for help on using the changeset viewer.