Rev 4132 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4132 | Rev 4137 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | #include <print.h> |
44 | #include <print.h> |
45 | #include <interrupt.h> |
45 | #include <interrupt.h> |
46 | #include <func.h> |
46 | #include <func.h> |
47 | #include <ddi/irq.h> |
47 | #include <ddi/irq.h> |
48 | #include <arch/debugger.h> |
48 | #include <arch/debugger.h> |
49 | - | ||
50 | #ifdef CONFIG_SYMTAB |
- | |
51 | #include <symtab.h> |
49 | #include <symtab.h> |
52 | #endif |
- | |
53 | 50 | ||
54 | static char * exctable[] = { |
51 | static char * exctable[] = { |
55 | "Interrupt", |
52 | "Interrupt", |
56 | "TLB Modified", |
53 | "TLB Modified", |
57 | "TLB Invalid", |
54 | "TLB Invalid", |
Line 74... | Line 71... | ||
74 | "Virtual Coherency - data", |
71 | "Virtual Coherency - data", |
75 | }; |
72 | }; |
76 | 73 | ||
77 | static void print_regdump(istate_t *istate) |
74 | static void print_regdump(istate_t *istate) |
78 | { |
75 | { |
79 | char *pcsymbol = ""; |
76 | char *pcsymbol, *rasymbol; |
- | 77 | ||
80 | char *rasymbol = ""; |
78 | pcsymbol = symtab_fmt_name_lookup(istate->epc); |
- | 79 | rasymbol = symtab_fmt_name_lookup(istate->ra); |
|
81 | 80 | ||
82 | #ifdef CONFIG_SYMTAB |
- | |
83 | char *s = get_symtab_entry(istate->epc); |
81 | printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, |
84 | if (s) |
- | |
85 | pcsymbol = s; |
- | |
86 | s = get_symtab_entry(istate->ra); |
82 | istate->ra, rasymbol, istate->sp); |
87 | if (s) |
- | |
88 | rasymbol = s; |
- | |
89 | #endif |
- | |
90 | - | ||
91 | printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); |
- | |
92 | } |
83 | } |
93 | 84 | ||
94 | static void unhandled_exception(int n, istate_t *istate) |
85 | static void unhandled_exception(int n, istate_t *istate) |
95 | { |
86 | { |
96 | fault_if_from_uspace(istate, "Unhandled exception %s.", exctable[n]); |
87 | fault_if_from_uspace(istate, "Unhandled exception %s.", exctable[n]); |