Rev 4101 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4101 | Rev 4132 | ||
|---|---|---|---|
| Line 33... | Line 33... | ||
| 33 | */ |
33 | */ |
| 34 | 34 | ||
| 35 | #include <arch/debugger.h> |
35 | #include <arch/debugger.h> |
| 36 | #include <console/kconsole.h> |
36 | #include <console/kconsole.h> |
| 37 | #include <console/cmd.h> |
37 | #include <console/cmd.h> |
| 38 | #include <symtab.h> |
- | |
| 39 | #include <print.h> |
38 | #include <print.h> |
| 40 | #include <panic.h> |
39 | #include <panic.h> |
| 41 | #include <interrupt.h> |
40 | #include <interrupt.h> |
| 42 | #include <arch/asm.h> |
41 | #include <arch/asm.h> |
| 43 | #include <arch/cpu.h> |
42 | #include <arch/cpu.h> |
| 44 | #include <debug.h> |
43 | #include <debug.h> |
| 45 | #include <func.h> |
44 | #include <func.h> |
| 46 | #include <smp/ipi.h> |
45 | #include <smp/ipi.h> |
| 47 | 46 | ||
| - | 47 | #ifdef CONFIG_SYMTAB |
|
| - | 48 | #include <symtab.h> |
|
| - | 49 | #endif |
|
| - | 50 | ||
| 48 | typedef struct { |
51 | typedef struct { |
| 49 | uintptr_t address; /**< Breakpoint address */ |
52 | uintptr_t address; /**< Breakpoint address */ |
| 50 | int flags; /**< Flags regarding breakpoint */ |
53 | int flags; /**< Flags regarding breakpoint */ |
| 51 | int counter; /**< How many times the exception occured */ |
54 | int counter; /**< How many times the exception occured */ |
| 52 | } bpinfo_t; |
55 | } bpinfo_t; |
| Line 227... | Line 230... | ||
| 227 | } else { |
230 | } else { |
| 228 | printf("Data watchpoint - new data: %lx\n", |
231 | printf("Data watchpoint - new data: %lx\n", |
| 229 | *((unative_t *) breakpoints[slot].address)); |
232 | *((unative_t *) breakpoints[slot].address)); |
| 230 | } |
233 | } |
| 231 | } |
234 | } |
| - | 235 | ||
| - | 236 | #ifdef CONFIG_SYMTAB |
|
| 232 | printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate), |
237 | printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate), |
| 233 | get_symtab_entry(getip(istate))); |
238 | get_symtab_entry(getip(istate))); |
| - | 239 | #else |
|
| - | 240 | printf("Reached breakpoint %d:%lx\n", slot, getip(istate)); |
|
| - | 241 | #endif |
|
| 234 | 242 | ||
| 235 | #ifdef CONFIG_KCONSOLE |
243 | #ifdef CONFIG_KCONSOLE |
| 236 | atomic_set(&haltstate, 1); |
244 | atomic_set(&haltstate, 1); |
| 237 | kconsole("debug", "Debug console ready.\n", false); |
245 | kconsole("debug", "Debug console ready.\n", false); |
| 238 | atomic_set(&haltstate, 0); |
246 | atomic_set(&haltstate, 0); |
| Line 353... | Line 361... | ||
| 353 | printf("-- ----- ------------------ ---------\n"); |
361 | printf("-- ----- ------------------ ---------\n"); |
| 354 | #endif |
362 | #endif |
| 355 | 363 | ||
| 356 | for (i = 0; i < BKPOINTS_MAX; i++) |
364 | for (i = 0; i < BKPOINTS_MAX; i++) |
| 357 | if (breakpoints[i].address) { |
365 | if (breakpoints[i].address) { |
| - | 366 | #ifdef CONFIG_SYMTAB |
|
| 358 | symbol = get_symtab_entry(breakpoints[i].address); |
367 | symbol = get_symtab_entry(breakpoints[i].address); |
| - | 368 | #else |
|
| - | 369 | symbol = "n/a"; |
|
| - | 370 | #endif |
|
| 359 | 371 | ||
| 360 | #ifdef __32_BITS__ |
372 | #ifdef __32_BITS__ |
| 361 | printf("%-2u %-5d %#10zx %s\n", i, |
373 | printf("%-2u %-5d %#10zx %s\n", i, |
| 362 | breakpoints[i].counter, breakpoints[i].address, |
374 | breakpoints[i].counter, breakpoints[i].address, |
| 363 | symbol); |
375 | symbol); |