Changeset 8ec9bae in mainline
- Timestamp:
- 2005-09-04T10:05:10Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8b786b6
- Parents:
- 339e053
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/interrupt.c
r339e053 r8ec9bae 40 40 #include <arch/asm.h> 41 41 42 #define PRINT_INFO_ERRCODE(n,x) { \ 43 char *symbol = get_symtab_entry(stack[1]); \ 44 if (!symbol) \ 45 symbol = ""; \ 46 printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n",n,__FUNCTION__); \ 47 printf("%%rip: %Q (%s)\n",x[1],symbol); \ 48 printf("ERROR_WORD=%Q\n", x[0]); \ 49 printf("%%rcs=%Q,flags=%Q, %%cr0=%Q\n", x[2], x[3],read_cr0()); \ 50 printf("%%rax=%Q, %%rbx=%Q, %%rcx=%Q\n",x[-2],x[-3],x[-4]); \ 51 printf("%%rdx=%Q, %%rsi=%Q, %%rdi=%Q\n",x[-5],x[-6],x[-7]); \ 52 printf("%%r8 =%Q, %%r9 =%Q, %%r10=%Q\n",x[-8],x[-9],x[-10]); \ 53 printf("%%r11=%Q, %%r12=%Q, %%r13=%Q\n",x[-11],x[-12],x[-13]); \ 54 printf("%%r14=%Q, %%r15=%Q, %%rsp=%Q\n",x[-14],x[-15],x); \ 55 printf("%%rbp=%Q\n",x[-1]); \ 56 printf("stack: %Q, %Q, %Q\n", x[5], x[6], x[7]); \ 57 printf(" %Q, %Q, %Q\n", x[8], x[9], x[10]); \ 58 printf(" %Q, %Q, %Q\n", x[11], x[12], x[13]); \ 59 printf(" %Q, %Q, %Q\n", x[14], x[15], x[16]); \ 60 printf(" %Q, %Q, %Q\n", x[17], x[18], x[19]); \ 61 printf(" %Q, %Q, %Q\n", x[20], x[21], x[22]); \ 62 printf(" %Q, %Q, %Q\n", x[23], x[24], x[25]); \ 63 } 42 43 static void print_info_errcode(__u8 n, __native x[]) 44 { 45 char *symbol; 46 47 if (!(symbol=get_symtab_entry(x[1]))) 48 symbol = ""; 49 50 printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n",n,__FUNCTION__); 51 printf("%%rip: %Q (%s)\n",x[1],symbol); 52 printf("ERROR_WORD=%Q\n", x[0]); 53 printf("%%rcs=%Q,flags=%Q, %%cr0=%Q\n", x[2], x[3],read_cr0()); 54 printf("%%rax=%Q, %%rbx=%Q, %%rcx=%Q\n",x[-2],x[-3],x[-4]); 55 printf("%%rdx=%Q, %%rsi=%Q, %%rdi=%Q\n",x[-5],x[-6],x[-7]); 56 printf("%%r8 =%Q, %%r9 =%Q, %%r10=%Q\n",x[-8],x[-9],x[-10]); 57 printf("%%r11=%Q, %%r12=%Q, %%r13=%Q\n",x[-11],x[-12],x[-13]); 58 printf("%%r14=%Q, %%r15=%Q, %%rsp=%Q\n",x[-14],x[-15],x); 59 printf("%%rbp=%Q\n",x[-1]); 60 printf("stack: %Q, %Q, %Q\n", x[5], x[6], x[7]); 61 printf(" %Q, %Q, %Q\n", x[8], x[9], x[10]); 62 printf(" %Q, %Q, %Q\n", x[11], x[12], x[13]); 63 printf(" %Q, %Q, %Q\n", x[14], x[15], x[16]); 64 printf(" %Q, %Q, %Q\n", x[17], x[18], x[19]); 65 printf(" %Q, %Q, %Q\n", x[20], x[21], x[22]); 66 printf(" %Q, %Q, %Q\n", x[23], x[24], x[25]); 67 } 64 68 65 69 /* … … 105 109 void gp_fault(__u8 n, __native stack[]) 106 110 { 107 PRINT_INFO_ERRCODE(n,stack);111 print_info_errcode(n,stack); 108 112 panic("general protection fault\n"); 109 113 } … … 111 115 void ss_fault(__u8 n, __native stack[]) 112 116 { 113 PRINT_INFO_ERRCODE(n,stack);117 print_info_errcode(n,stack); 114 118 panic("stack fault\n"); 115 119 } … … 137 141 void page_fault(__u8 n, __native stack[]) 138 142 { 139 PRINT_INFO_ERRCODE(n,stack);143 print_info_errcode(n,stack); 140 144 printf("Page fault address: %Q\n", read_cr2()); 141 145 panic("page fault\n");
Note:
See TracChangeset
for help on using the changeset viewer.