Changes in kernel/arch/ia32/src/interrupt.c [c9eb31c2:214ec25c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/interrupt.c
rc9eb31c2 r214ec25c 63 63 void (* eoi_function)(void) = NULL; 64 64 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); 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); 84 82 } 85 83 … … 96 94 { 97 95 fault_if_from_uspace(istate, "Unserviced interrupt: %u.", n); 98 panic_badtrap(istate, n, "Unserviced interrupt: %u.", n); 96 97 decode_istate(istate); 98 panic("Unserviced interrupt: %u.", n); 99 99 } 100 100 … … 102 102 { 103 103 fault_if_from_uspace(istate, "Divide error."); 104 panic_badtrap(istate, n, "Divide error."); 104 105 decode_istate(istate); 106 panic("Divide error."); 105 107 } 106 108 … … 126 128 fault_if_from_uspace(istate, "General protection fault."); 127 129 } 128 panic_badtrap(istate, n, "General protection fault."); 130 131 decode_istate(istate); 132 panic("General protection fault."); 129 133 } 130 134 … … 132 136 { 133 137 fault_if_from_uspace(istate, "Stack fault."); 134 panic_badtrap(istate, n, "Stack fault."); 138 139 decode_istate(istate); 140 panic("Stack fault."); 135 141 } 136 142 … … 143 149 ); 144 150 145 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR =%#0.8x.",151 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zx.", 146 152 (unative_t) mxcsr); 147 panic_badtrap(istate, n, "SIMD FP exception, MXCSR=%#0.8x"); 153 154 decode_istate(istate); 155 printf("MXCSR: %#lx\n", mxcsr); 156 panic("SIMD FP exception(19)."); 148 157 } 149 158 … … 155 164 #else 156 165 fault_if_from_uspace(istate, "FPU fault."); 157 panic _badtrap(istate, n,"FPU fault.");166 panic("FPU fault."); 158 167 #endif 159 168 }
Note:
See TracChangeset
for help on using the changeset viewer.