37,12 → 37,12 |
#include <memstr.h> |
#include <console/kconsole.h> |
#include <console/cmd.h> |
#include <symtab.h> |
#include <print.h> |
#include <panic.h> |
#include <arch.h> |
#include <arch/cp0.h> |
#include <func.h> |
#include <symtab.h> |
|
bpinfo_t breakpoints[BKPOINTS_MAX]; |
SPINLOCK_INITIALIZE(bkpoint_lock); |
259,8 → 259,9 |
|
for (i = 0; i < BKPOINTS_MAX; i++) |
if (breakpoints[i].address) { |
symbol = get_symtab_entry(breakpoints[i].address); |
|
symbol = symtab_fmt_name_lookup( |
breakpoints[i].address); |
|
printf("%-2u %-5d %#10zx %-6s %-7s %-8s %s\n", i, |
breakpoints[i].counter, breakpoints[i].address, |
((breakpoints[i].flags & BKPOINT_INPROG) ? "true" : |
348,9 → 349,10 |
if (cur->flags & BKPOINT_INPROG) |
printf("Warning: breakpoint recursion\n"); |
|
if (!(cur->flags & BKPOINT_FUNCCALL)) |
if (!(cur->flags & BKPOINT_FUNCCALL)) { |
printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, |
get_symtab_entry(istate->epc)); |
symtab_fmt_name_lookup(istate->epc)); |
} |
|
/* Return first instruction back */ |
((uint32_t *)cur->address)[0] = cur->instruction; |
363,8 → 365,9 |
} |
cur->flags |= BKPOINT_INPROG; |
} else { |
printf("***Breakpoint %p in %s.\n", fireaddr, |
get_symtab_entry(fireaddr)); |
printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, |
symtab_fmt_name_lookup(fireaddr)); |
|
/* Move on to next instruction */ |
istate->epc += 4; |
} |
384,7 → 387,7 |
atomic_set(&haltstate, 1); |
spinlock_unlock(&bkpoint_lock); |
|
kconsole("debug", "Debug console ready (type 'exit' to continue)\n", false); |
kconsole("debug", "Debug console ready.\n", false); |
|
spinlock_lock(&bkpoint_lock); |
atomic_set(&haltstate, 0); |