Changeset e16e0d59 in mainline for kernel/arch/mips32/src/exception.c


Ignore:
Timestamp:
2009-03-17T20:33:18Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5eb90cb
Parents:
b1c8dc0
Message:

Make optionality of symbol information less intrusive per Jakub's request. Also, improve symtab function names and update their semantics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/exception.c

    rb1c8dc0 re16e0d59  
    4747#include <ddi/irq.h>
    4848#include <arch/debugger.h>
    49 
    50 #ifdef CONFIG_SYMTAB
    5149#include <symtab.h>
    52 #endif
    5350
    5451static char * exctable[] = {
     
    7774static void print_regdump(istate_t *istate)
    7875{
    79         char *pcsymbol = "";
    80         char *rasymbol = "";
     76        char *pcsymbol, *rasymbol;
    8177
    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);
    9283}
    9384
Note: See TracChangeset for help on using the changeset viewer.