Changes in kernel/arch/amd64/src/interrupt.c [22a28a69:214ec25c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/interrupt.c
r22a28a69 r214ec25c 63 63 void (* eoi_function)(void) = NULL; 64 64 65 void istate_decode(istate_t *istate) 66 { 67 printf("error_word=%#llx\n", istate->error_word); 68 printf("cs =%#0.16llx\trflags=%#0.16llx\n", istate->cs, 69 istate->rflags); 70 printf("rax=%#0.16llx\trbx=%#0.16llx\trcx=%#0.16llx\n", istate->rax, 65 void decode_istate(int n, istate_t *istate) 66 { 67 const char *symbol = symtab_fmt_name_lookup(istate->rip); 68 69 printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n", n, __func__); 70 printf("%%rip: %#llx (%s)\n", istate->rip, symbol); 71 printf("ERROR_WORD=%#llx\n", istate->error_word); 72 printf("%%cs=%#llx, rflags=%#llx, %%cr0=%#llx\n", istate->cs, 73 istate->rflags, read_cr0()); 74 printf("%%rax=%#llx, %%rcx=%#llx, %%rdx=%#llx\n", istate->rax, 71 75 istate->rcx, istate->rdx); 72 printf(" rsi=%#0.16llx\trdi=%#0.16llx\tr8 =%#0.16llx\n", istate->rsi,76 printf("%%rsi=%#llx, %%rdi=%#llx, %%r8=%#llx\n", istate->rsi, 73 77 istate->rdi, istate->r8); 74 printf(" r9 =%#0.16llx\tr10=%#0.16llx\tr11=%#0.16llx\n", istate->r9,78 printf("%%r9=%#llx, %%r10=%#llx, %%r11=%#llx\n", istate->r9, 75 79 istate->r10, istate->r11); 80 printf("%%rsp=%#llx\n", &istate->stack[0]); 81 82 stack_trace_istate(istate); 76 83 } 77 84 … … 88 95 { 89 96 fault_if_from_uspace(istate, "Unserviced interrupt: %u.", n); 90 panic_badtrap(istate, n, "Unserviced interrupt."); 97 decode_istate(n, istate); 98 panic("Unserviced interrupt."); 91 99 } 92 100 … … 94 102 { 95 103 fault_if_from_uspace(istate, "Divide error."); 96 panic_badtrap(istate, n, "Divide error."); 104 decode_istate(n, istate); 105 panic("Divide error."); 97 106 } 98 107 … … 120 129 fault_if_from_uspace(istate, "General protection fault."); 121 130 } 122 panic_badtrap(istate, n, "General protection fault."); 131 132 decode_istate(n, istate); 133 panic("General protection fault."); 123 134 } 124 135 … … 126 137 { 127 138 fault_if_from_uspace(istate, "Stack fault."); 128 panic_badtrap(istate, n, "Stack fault."); 139 decode_istate(n, istate); 140 panic("Stack fault."); 129 141 } 130 142
Note:
See TracChangeset
for help on using the changeset viewer.