/trunk/kernel/arch/sparc64/src/trap/exception.c |
---|
41,21 → 41,15 |
#include <arch/register.h> |
#include <debug.h> |
#include <print.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
void dump_istate(istate_t *istate) |
{ |
char *tpcs, *tnpcs; |
#ifdef CONFIG_SYMTAB |
tpcs = get_symtab_entry(istate->tpc); |
tnpcs = get_symtab_entry(istate->tnpc); |
#else |
tpcs = tnpcs = "n/a"; |
#endif |
tpcs = symtab_fmt_name_lookup(istate->tpc); |
tnpcs = symtab_fmt_name_lookup(istate->tnpc); |
printf("TSTATE=%#" PRIx64 "\n", istate->tstate); |
printf("TPC=%#" PRIx64 " (%s)\n", istate->tpc, tpcs); |
printf("TNPC=%#" PRIx64 " (%s)\n", istate->tnpc, tnpcs); |
/trunk/kernel/arch/ia64/src/interrupt.c |
---|
53,10 → 53,7 |
#include <ipc/ipc.h> |
#include <synch/spinlock.h> |
#include <mm/tlb.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
#define VECTORS_64_BUNDLE 20 |
#define VECTORS_16_BUNDLE 48 |
140,13 → 137,9 |
{ |
char *ifa, *iipa, *iip; |
#ifdef CONFIG_SYMTAB |
ifa = get_symtab_entry(istate->cr_ifa); |
iipa = get_symtab_entry(istate->cr_iipa); |
iip = get_symtab_entry(istate->cr_iip); |
#else |
ifa = iipa = iip = "n/a"; |
#endif |
ifa = symtab_fmt_name_lookup(istate->cr_ifa); |
iipa = symtab_fmt_name_lookup(istate->cr_iipa); |
iip = symtab_fmt_name_lookup(istate->cr_iip); |
putchar('\n'); |
printf("Interrupted context dump:\n"); |
/trunk/kernel/arch/ppc32/src/mm/tlb.c |
---|
40,10 → 40,7 |
#include <arch.h> |
#include <print.h> |
#include <macros.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
static unsigned int seed = 10; |
static unsigned int seed_real __attribute__ ((section("K_UNMAPPED_DATA_START"))) = 42; |
120,17 → 117,11 |
static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate) |
{ |
char *symbol = ""; |
char *sym2 = ""; |
char *symbol; |
char *sym2; |
#ifdef CONFIG_SYMTAB |
char *str = get_symtab_entry(istate->pc); |
if (str) |
symbol = str; |
str = get_symtab_entry(istate->lr); |
if (str) |
sym2 = str; |
#endif |
symbol = symtab_fmt_name_lookup(istate->pc); |
sym2 = symtab_fmt_name_lookup(istate->lr); |
fault_if_from_uspace(istate, |
"PHT Refill Exception on %p.", badvaddr); |
/trunk/kernel/arch/amd64/src/debugger.c |
---|
43,10 → 43,7 |
#include <debug.h> |
#include <func.h> |
#include <smp/ipi.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
typedef struct { |
uintptr_t address; /**< Breakpoint address */ |
233,12 → 230,8 |
} |
} |
#ifdef CONFIG_SYMTAB |
printf("Reached breakpoint %d:%lx(%s)\n", slot, getip(istate), |
get_symtab_entry(getip(istate))); |
#else |
printf("Reached breakpoint %d:%lx\n", slot, getip(istate)); |
#endif |
printf("Reached breakpoint %d:%lx (%s)\n", slot, getip(istate), |
symtab_fmt_name_lookup(getip(istate))); |
#ifdef CONFIG_KCONSOLE |
atomic_set(&haltstate, 1); |
363,11 → 356,8 |
for (i = 0; i < BKPOINTS_MAX; i++) |
if (breakpoints[i].address) { |
#ifdef CONFIG_SYMTAB |
symbol = get_symtab_entry(breakpoints[i].address); |
#else |
symbol = "n/a"; |
#endif |
symbol = symtab_fmt_name_lookup( |
breakpoints[i].address); |
#ifdef __32_BITS__ |
printf("%-2u %-5d %#10zx %s\n", i, |
/trunk/kernel/arch/amd64/src/interrupt.c |
---|
51,10 → 51,7 |
#include <arch/ddi/ddi.h> |
#include <interrupt.h> |
#include <ddi/irq.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
/* |
* Interrupt and exception dispatching. |
67,14 → 64,8 |
void decode_istate(int n, istate_t *istate) |
{ |
char *symbol; |
/* uint64_t *x = &istate->stack[0]; */ |
#ifdef CONFIG_SYMTAB |
if (!(symbol = get_symtab_entry(istate->rip))) |
symbol = ""; |
#else |
symbol = ""; |
#endif |
symbol = symtab_fmt_name_lookup((istate->rip); |
printf("-----EXCEPTION(%d) OCCURED----- ( %s )\n", n, __func__); |
printf("%%rip: %#llx (%s)\n", istate->rip, symbol); |
/trunk/kernel/arch/mips32/src/exception.c |
---|
46,10 → 46,7 |
#include <func.h> |
#include <ddi/irq.h> |
#include <arch/debugger.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
static char * exctable[] = { |
"Interrupt", |
76,19 → 73,13 |
static void print_regdump(istate_t *istate) |
{ |
char *pcsymbol = ""; |
char *rasymbol = ""; |
char *pcsymbol, *rasymbol; |
#ifdef CONFIG_SYMTAB |
char *s = get_symtab_entry(istate->epc); |
if (s) |
pcsymbol = s; |
s = get_symtab_entry(istate->ra); |
if (s) |
rasymbol = s; |
#endif |
printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); |
pcsymbol = symtab_fmt_name_lookup(istate->epc); |
rasymbol = symtab_fmt_name_lookup(istate->ra); |
printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, |
istate->ra, rasymbol, istate->sp); |
} |
static void unhandled_exception(int n, istate_t *istate) |
/trunk/kernel/arch/mips32/src/debugger.c |
---|
42,10 → 42,7 |
#include <arch.h> |
#include <arch/cp0.h> |
#include <func.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
bpinfo_t breakpoints[BKPOINTS_MAX]; |
SPINLOCK_INITIALIZE(bkpoint_lock); |
262,12 → 259,9 |
for (i = 0; i < BKPOINTS_MAX; i++) |
if (breakpoints[i].address) { |
#ifdef CONFIG_SYMTAB |
symbol = get_symtab_entry(breakpoints[i].address); |
#else |
symbol = "n/a"; |
#endif |
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" : |
356,12 → 350,8 |
printf("Warning: breakpoint recursion\n"); |
if (!(cur->flags & BKPOINT_FUNCCALL)) { |
#ifdef CONFIG_SYMTAB |
printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, |
get_symtab_entry(istate->epc)); |
#else |
printf("***Breakpoint %d: %p.\n", i, fireaddr); |
#endif |
symtab_fmt_name_lookup(istate->epc)); |
} |
/* Return first instruction back */ |
375,12 → 365,9 |
} |
cur->flags |= BKPOINT_INPROG; |
} else { |
#ifdef CONFIG_SYMTAB |
printf("***Breakpoint %p in %s.\n", fireaddr, |
get_symtab_entry(fireaddr)); |
#else |
printf("***Breakpoint %p.\n", fireaddr); |
#endif |
printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, |
symtab_fmt_name_lookup(fireaddr)); |
/* Move on to next instruction */ |
istate->epc += 4; |
} |
/trunk/kernel/arch/mips32/src/mm/tlb.c |
---|
45,10 → 45,7 |
#include <debug.h> |
#include <align.h> |
#include <interrupt.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
static void tlb_refill_fail(istate_t *); |
static void tlb_invalid_fail(istate_t *); |
323,21 → 320,14 |
void tlb_refill_fail(istate_t *istate) |
{ |
char *symbol = ""; |
char *sym2 = ""; |
char *symbol, *sym2; |
#ifdef CONFIG_SYMTAB |
char *s = get_symtab_entry(istate->epc); |
if (s) |
symbol = s; |
s = get_symtab_entry(istate->ra); |
if (s) |
sym2 = s; |
#endif |
symbol = symtab_fmt_name_lookup(istate->epc); |
sym2 = symtab_fmt_name_lookup(istate->ra); |
fault_if_from_uspace(istate, "TLB Refill Exception on %p.", |
cp0_badvaddr_read()); |
panic("%x: TLB Refill Exception at %x(%s<-%s).", cp0_badvaddr_read(), |
panic("%x: TLB Refill Exception at %x (%s<-%s).", cp0_badvaddr_read(), |
istate->epc, symbol, sym2); |
} |
344,33 → 334,25 |
void tlb_invalid_fail(istate_t *istate) |
{ |
char *symbol = ""; |
char *symbol; |
#ifdef CONFIG_SYMTAB |
char *s = get_symtab_entry(istate->epc); |
if (s) |
symbol = s; |
#endif |
symbol = symtab_fmt_name_lookup(istate->epc); |
fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", |
cp0_badvaddr_read()); |
panic("%x: TLB Invalid Exception at %x(%s).", cp0_badvaddr_read(), |
panic("%x: TLB Invalid Exception at %x (%s).", cp0_badvaddr_read(), |
istate->epc, symbol); |
} |
void tlb_modified_fail(istate_t *istate) |
{ |
char *symbol = ""; |
char *symbol; |
#ifdef CONFIG_SYMTAB |
char *s = get_symtab_entry(istate->epc); |
if (s) |
symbol = s; |
#endif |
symbol = symtab_fmt_name_lookup(istate->epc); |
fault_if_from_uspace(istate, "TLB Modified Exception on %p.", |
cp0_badvaddr_read()); |
panic("%x: TLB Modified Exception at %x(%s).", cp0_badvaddr_read(), |
panic("%x: TLB Modified Exception at %x (%s).", cp0_badvaddr_read(), |
istate->epc, symbol); |
} |
/trunk/kernel/arch/ia32/src/interrupt.c |
---|
51,10 → 51,7 |
#include <ipc/sysipc.h> |
#include <interrupt.h> |
#include <ddi/irq.h> |
#ifdef CONFIG_SYMTAB |
#include <symtab.h> |
#endif |
/* |
* Interrupt and exception dispatching. |
68,13 → 65,7 |
{ |
char *symbol; |
#ifdef CONFIG_SYMTAB |
symbol = get_symtab_entry(istate->eip); |
if (!symbol) |
symbol = ""; |
#else |
symbol = ""; |
#endif |
symbol = symtab_fmt_name_lookup(istate->eip); |
if (CPU) |
printf("----------------EXCEPTION OCCURED (cpu%u)----------------\n", CPU->id); |