Changeset e16e0d59 in mainline for kernel/arch/mips32/src
- Timestamp:
- 2009-03-17T20:33:18Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5eb90cb
- Parents:
- b1c8dc0
- Location:
- kernel/arch/mips32/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/debugger.c
rb1c8dc0 re16e0d59 43 43 #include <arch/cp0.h> 44 44 #include <func.h> 45 46 #ifdef CONFIG_SYMTAB47 45 #include <symtab.h> 48 #endif49 46 50 47 bpinfo_t breakpoints[BKPOINTS_MAX]; … … 263 260 for (i = 0; i < BKPOINTS_MAX; i++) 264 261 if (breakpoints[i].address) { 265 #ifdef CONFIG_SYMTAB 266 symbol = get_symtab_entry(breakpoints[i].address); 267 #else 268 symbol = "n/a"; 269 #endif 270 262 symbol = symtab_fmt_name_lookup( 263 breakpoints[i].address); 264 271 265 printf("%-2u %-5d %#10zx %-6s %-7s %-8s %s\n", i, 272 266 breakpoints[i].counter, breakpoints[i].address, … … 357 351 358 352 if (!(cur->flags & BKPOINT_FUNCCALL)) { 359 #ifdef CONFIG_SYMTAB360 353 printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, 361 get_symtab_entry(istate->epc)); 362 #else 363 printf("***Breakpoint %d: %p.\n", i, fireaddr); 364 #endif 354 symtab_fmt_name_lookup(istate->epc)); 365 355 } 366 356 … … 376 366 cur->flags |= BKPOINT_INPROG; 377 367 } else { 378 #ifdef CONFIG_SYMTAB 379 printf("***Breakpoint %p in %s.\n", fireaddr, 380 get_symtab_entry(fireaddr)); 381 #else 382 printf("***Breakpoint %p.\n", fireaddr); 383 #endif 368 printf("***Breakpoint %d: %p in %s.\n", i, fireaddr, 369 symtab_fmt_name_lookup(fireaddr)); 370 384 371 /* Move on to next instruction */ 385 372 istate->epc += 4; -
kernel/arch/mips32/src/exception.c
rb1c8dc0 re16e0d59 47 47 #include <ddi/irq.h> 48 48 #include <arch/debugger.h> 49 50 #ifdef CONFIG_SYMTAB51 49 #include <symtab.h> 52 #endif53 50 54 51 static char * exctable[] = { … … 77 74 static void print_regdump(istate_t *istate) 78 75 { 79 char *pcsymbol = ""; 80 char *rasymbol = ""; 76 char *pcsymbol, *rasymbol; 81 77 82 #ifdef CONFIG_SYMTAB 83 char *s = get_symtab_entry(istate->epc); 84 if (s) 85 pcsymbol = s; 86 s = get_symtab_entry(istate->ra); 87 if (s) 88 rasymbol = s; 89 #endif 90 91 printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, istate->ra, rasymbol, istate->sp); 78 pcsymbol = symtab_fmt_name_lookup(istate->epc); 79 rasymbol = symtab_fmt_name_lookup(istate->ra); 80 81 printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol, 82 istate->ra, rasymbol, istate->sp); 92 83 } 93 84 -
kernel/arch/mips32/src/mm/tlb.c
rb1c8dc0 re16e0d59 46 46 #include <align.h> 47 47 #include <interrupt.h> 48 49 #ifdef CONFIG_SYMTAB50 48 #include <symtab.h> 51 #endif52 49 53 50 static void tlb_refill_fail(istate_t *); … … 324 321 void tlb_refill_fail(istate_t *istate) 325 322 { 326 char *symbol = ""; 327 char *sym2 = ""; 328 329 #ifdef CONFIG_SYMTAB 330 char *s = get_symtab_entry(istate->epc); 331 if (s) 332 symbol = s; 333 s = get_symtab_entry(istate->ra); 334 if (s) 335 sym2 = s; 336 #endif 337 323 char *symbol, *sym2; 324 325 symbol = symtab_fmt_name_lookup(istate->epc); 326 sym2 = symtab_fmt_name_lookup(istate->ra); 327 338 328 fault_if_from_uspace(istate, "TLB Refill Exception on %p.", 339 329 cp0_badvaddr_read()); 340 panic("%x: TLB Refill Exception at %x (%s<-%s).", cp0_badvaddr_read(),330 panic("%x: TLB Refill Exception at %x (%s<-%s).", cp0_badvaddr_read(), 341 331 istate->epc, symbol, sym2); 342 332 } … … 345 335 void tlb_invalid_fail(istate_t *istate) 346 336 { 347 char *symbol = ""; 348 349 #ifdef CONFIG_SYMTAB 350 char *s = get_symtab_entry(istate->epc); 351 if (s) 352 symbol = s; 353 #endif 337 char *symbol; 338 339 symbol = symtab_fmt_name_lookup(istate->epc); 354 340 355 341 fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", 356 342 cp0_badvaddr_read()); 357 panic("%x: TLB Invalid Exception at %x (%s).", cp0_badvaddr_read(),343 panic("%x: TLB Invalid Exception at %x (%s).", cp0_badvaddr_read(), 358 344 istate->epc, symbol); 359 345 } … … 361 347 void tlb_modified_fail(istate_t *istate) 362 348 { 363 char *symbol = ""; 364 365 #ifdef CONFIG_SYMTAB 366 char *s = get_symtab_entry(istate->epc); 367 if (s) 368 symbol = s; 369 #endif 349 char *symbol; 350 351 symbol = symtab_fmt_name_lookup(istate->epc); 370 352 371 353 fault_if_from_uspace(istate, "TLB Modified Exception on %p.", 372 354 cp0_badvaddr_read()); 373 panic("%x: TLB Modified Exception at %x (%s).", cp0_badvaddr_read(),355 panic("%x: TLB Modified Exception at %x (%s).", cp0_badvaddr_read(), 374 356 istate->epc, symbol); 375 357 }
Note:
See TracChangeset
for help on using the changeset viewer.