Rev 593 | Rev 610 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 593 | Rev 609 | ||
|---|---|---|---|
| Line 35... | Line 35... | ||
| 35 | #include <debug.h> |
35 | #include <debug.h> |
| 36 | #include <proc/thread.h> |
36 | #include <proc/thread.h> |
| 37 | #include <symtab.h> |
37 | #include <symtab.h> |
| 38 | #include <print.h> |
38 | #include <print.h> |
| 39 | #include <interrupt.h> |
39 | #include <interrupt.h> |
| - | 40 | #include <func.h> |
|
| - | 41 | #include <console/kconsole.h> |
|
| 40 | 42 | ||
| 41 | static char * exctable[] = { |
43 | static char * exctable[] = { |
| 42 | "Interrupt","TLB Modified","TLB Invalid","TLB Invalid Store", |
44 | "Interrupt","TLB Modified","TLB Invalid","TLB Invalid Store", |
| 43 | "Address Error - load/instr. fetch", |
45 | "Address Error - load/instr. fetch", |
| 44 | "Address Error - store", |
46 | "Address Error - store", |
| Line 83... | Line 85... | ||
| 83 | } |
85 | } |
| 84 | 86 | ||
| 85 | static void breakpoint_exception(int n, void *data) |
87 | static void breakpoint_exception(int n, void *data) |
| 86 | { |
88 | { |
| 87 | struct exception_regdump *pstate = (struct exception_regdump *)data; |
89 | struct exception_regdump *pstate = (struct exception_regdump *)data; |
| - | 90 | char *symbol = get_symtab_entry(pstate->epc); |
|
| - | 91 | ||
| - | 92 | #ifdef CONFIG_DEBUG |
|
| - | 93 | printf("***Breakpoint %p in %s.\n", pstate->epc, symbol); |
|
| - | 94 | printf("***Type 'exit' to exit kconsole.\n"); |
|
| - | 95 | /* Umm..we should rather set some 'debugstate' here */ |
|
| - | 96 | haltstate = 1; |
|
| - | 97 | kconsole("debug"); |
|
| - | 98 | haltstate = 0; |
|
| - | 99 | #endif |
|
| - | 100 | ||
| 88 | /* it is necessary to not re-execute BREAK instruction after |
101 | /* it is necessary to not re-execute BREAK instruction after |
| 89 | returning from Exception handler |
102 | returning from Exception handler |
| 90 | (see page 138 in R4000 Manual for more information) */ |
103 | (see page 138 in R4000 Manual for more information) */ |
| 91 | pstate->epc += 4; |
104 | pstate->epc += 4; |
| 92 | } |
105 | } |