Rev 3906 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3906 | Rev 4132 | ||
|---|---|---|---|
| Line 39... | Line 39... | ||
| 39 | #include <arch/cp0.h> |
39 | #include <arch/cp0.h> |
| 40 | #include <arch/types.h> |
40 | #include <arch/types.h> |
| 41 | #include <arch.h> |
41 | #include <arch.h> |
| 42 | #include <debug.h> |
42 | #include <debug.h> |
| 43 | #include <proc/thread.h> |
43 | #include <proc/thread.h> |
| 44 | #include <symtab.h> |
- | |
| 45 | #include <print.h> |
44 | #include <print.h> |
| 46 | #include <interrupt.h> |
45 | #include <interrupt.h> |
| 47 | #include <func.h> |
46 | #include <func.h> |
| 48 | #include <ddi/irq.h> |
47 | #include <ddi/irq.h> |
| 49 | #include <arch/debugger.h> |
48 | #include <arch/debugger.h> |
| 50 | 49 | ||
| - | 50 | #ifdef CONFIG_SYMTAB |
|
| - | 51 | #include <symtab.h> |
|
| - | 52 | #endif |
|
| - | 53 | ||
| 51 | static char * exctable[] = { |
54 | static char * exctable[] = { |
| 52 | "Interrupt", |
55 | "Interrupt", |
| 53 | "TLB Modified", |
56 | "TLB Modified", |
| 54 | "TLB Invalid", |
57 | "TLB Invalid", |
| 55 | "TLB Invalid Store", |
58 | "TLB Invalid Store", |
| Line 74... | Line 77... | ||
| 74 | static void print_regdump(istate_t *istate) |
77 | static void print_regdump(istate_t *istate) |
| 75 | { |
78 | { |
| 76 | char *pcsymbol = ""; |
79 | char *pcsymbol = ""; |
| 77 | char *rasymbol = ""; |
80 | char *rasymbol = ""; |
| 78 | 81 | ||
| - | 82 | #ifdef CONFIG_SYMTAB |
|
| 79 | char *s = get_symtab_entry(istate->epc); |
83 | char *s = get_symtab_entry(istate->epc); |
| 80 | if (s) |
84 | if (s) |
| 81 | pcsymbol = s; |
85 | pcsymbol = s; |
| 82 | s = get_symtab_entry(istate->ra); |
86 | s = get_symtab_entry(istate->ra); |
| 83 | if (s) |
87 | if (s) |
| 84 | rasymbol = s; |
88 | rasymbol = s; |
| - | 89 | #endif |
|
| 85 | 90 | ||
| 86 | printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); |
91 | printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); |
| 87 | } |
92 | } |
| 88 | 93 | ||
| 89 | static void unhandled_exception(int n, istate_t *istate) |
94 | static void unhandled_exception(int n, istate_t *istate) |