Rev 4337 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4337 | Rev 4346 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | 40 | ||
41 | #include <interrupt.h> |
41 | #include <interrupt.h> |
42 | #include <debug.h> |
42 | #include <debug.h> |
43 | #include <console/kconsole.h> |
43 | #include <console/kconsole.h> |
44 | #include <console/console.h> |
44 | #include <console/console.h> |
45 | #include <console/chardev.h> |
- | |
46 | #include <console/cmd.h> |
45 | #include <console/cmd.h> |
47 | #include <panic.h> |
46 | #include <panic.h> |
48 | #include <print.h> |
47 | #include <print.h> |
49 | #include <symtab.h> |
48 | #include <symtab.h> |
50 | 49 | ||
Line 66... | Line 65... | ||
66 | ASSERT(n < IVT_ITEMS); |
65 | ASSERT(n < IVT_ITEMS); |
67 | 66 | ||
68 | iroutine old; |
67 | iroutine old; |
69 | 68 | ||
70 | spinlock_lock(&exctbl_lock); |
69 | spinlock_lock(&exctbl_lock); |
71 | 70 | ||
72 | old = exc_table[n].f; |
71 | old = exc_table[n].f; |
73 | exc_table[n].f = f; |
72 | exc_table[n].f = f; |
74 | exc_table[n].name = name; |
73 | exc_table[n].name = name; |
75 | 74 | ||
76 | spinlock_unlock(&exctbl_lock); |
75 | spinlock_unlock(&exctbl_lock); |
77 | 76 | ||
78 | return old; |
77 | return old; |
79 | } |
78 | } |
80 | 79 | ||
81 | /** Dispatch exception according to exception table |
80 | /** Dispatch exception according to exception table |
82 | * |
81 | * |
Line 129... | Line 128... | ||
129 | printf("Exc Description Handler Symbol\n"); |
128 | printf("Exc Description Handler Symbol\n"); |
130 | printf("--- -------------------- ------------------ --------\n"); |
129 | printf("--- -------------------- ------------------ --------\n"); |
131 | #endif |
130 | #endif |
132 | 131 | ||
133 | for (i = 0; i < IVT_ITEMS; i++) { |
132 | for (i = 0; i < IVT_ITEMS; i++) { |
134 | symbol = get_symtab_entry((unative_t) exc_table[i].f); |
133 | symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f); |
135 | if (!symbol) |
- | |
136 | symbol = "not found"; |
- | |
137 | 134 | ||
138 | #ifdef __32_BITS__ |
135 | #ifdef __32_BITS__ |
139 | printf("%-3u %-20s %10p %s\n", i + IVT_FIRST, exc_table[i].name, |
136 | printf("%-3u %-20s %10p %s\n", i + IVT_FIRST, exc_table[i].name, |
140 | exc_table[i].f, symbol); |
137 | exc_table[i].f, symbol); |
141 | #endif |
138 | #endif |
Line 146... | Line 143... | ||
146 | #endif |
143 | #endif |
147 | 144 | ||
148 | if (((i + 1) % 20) == 0) { |
145 | if (((i + 1) % 20) == 0) { |
149 | printf(" -- Press any key to continue -- "); |
146 | printf(" -- Press any key to continue -- "); |
150 | spinlock_unlock(&exctbl_lock); |
147 | spinlock_unlock(&exctbl_lock); |
151 | getc(stdin); |
148 | _getc(stdin); |
152 | spinlock_lock(&exctbl_lock); |
149 | spinlock_lock(&exctbl_lock); |
153 | printf("\n"); |
150 | printf("\n"); |
154 | } |
151 | } |
155 | } |
152 | } |
156 | 153 |