Rev 4343 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4343 | Rev 4346 | ||
|---|---|---|---|
| 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> |
| - | 46 | #include <symtab.h> |
|
| 47 | 47 | ||
| 48 | typedef struct { |
48 | typedef struct { |
| 49 | uintptr_t address; /**< Breakpoint address */ |
49 | uintptr_t address; /**< Breakpoint address */ |
| 50 | int flags; /**< Flags regarding breakpoint */ |
50 | int flags; /**< Flags regarding breakpoint */ |
| 51 | int counter; /**< How many times the exception occured */ |
51 | int counter; /**< How many times the exception occured */ |
| Line 227... | Line 227... | ||
| 227 | } else { |
227 | } else { |
| 228 | printf("Data watchpoint - new data: %lx\n", |
228 | printf("Data watchpoint - new data: %lx\n", |
| 229 | *((unative_t *) breakpoints[slot].address)); |
229 | *((unative_t *) breakpoints[slot].address)); |
| 230 | } |
230 | } |
| 231 | } |
231 | } |
| - | 232 | ||
| 232 | printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate), |
233 | printf("Reached breakpoint %d:%lx (%s)\n", slot, getip(istate), |
| 233 | get_symtab_entry(getip(istate))); |
234 | symtab_fmt_name_lookup(getip(istate))); |
| 234 | 235 | ||
| 235 | #ifdef CONFIG_KCONSOLE |
236 | #ifdef CONFIG_KCONSOLE |
| 236 | atomic_set(&haltstate, 1); |
237 | atomic_set(&haltstate, 1); |
| 237 | kconsole("debug", "Debug console ready (type 'exit' to continue)\n", false); |
238 | kconsole("debug", "Debug console ready.\n", false); |
| 238 | atomic_set(&haltstate, 0); |
239 | atomic_set(&haltstate, 0); |
| 239 | #endif |
240 | #endif |
| 240 | } |
241 | } |
| 241 | 242 | ||
| 242 | void breakpoint_del(int slot) |
243 | void breakpoint_del(int slot) |
| Line 353... | Line 354... | ||
| 353 | printf("-- ----- ------------------ ---------\n"); |
354 | printf("-- ----- ------------------ ---------\n"); |
| 354 | #endif |
355 | #endif |
| 355 | 356 | ||
| 356 | for (i = 0; i < BKPOINTS_MAX; i++) |
357 | for (i = 0; i < BKPOINTS_MAX; i++) |
| 357 | if (breakpoints[i].address) { |
358 | if (breakpoints[i].address) { |
| - | 359 | symbol = symtab_fmt_name_lookup( |
|
| 358 | symbol = get_symtab_entry(breakpoints[i].address); |
360 | breakpoints[i].address); |
| 359 | 361 | ||
| 360 | #ifdef __32_BITS__ |
362 | #ifdef __32_BITS__ |
| 361 | printf("%-2u %-5d %#10zx %s\n", i, |
363 | printf("%-2u %-5d %#10zx %s\n", i, |
| 362 | breakpoints[i].counter, breakpoints[i].address, |
364 | breakpoints[i].counter, breakpoints[i].address, |
| 363 | symbol); |
365 | symbol); |