~martin-decky/helenos/rcu

« back to all changes in this revision

Viewing changes to kernel/arch/mips32/src/exception.c

  • Committer: Martin Decky
  • Date: 2010-02-25 19:11:25 UTC
  • Revision ID: martin@uranus.dsrg.hide.ms.mff.cuni.cz-20100225191125-kbzwwihgu0uj0dss
make sure that all statically allocated strings are declared as "const char *"
and are treated as read-only

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#include <arch/debugger.h>
49
49
#include <symtab.h>
50
50
 
51
 
static char * exctable[] = {
 
51
static const char *exctable[] = {
52
52
        "Interrupt",
53
53
        "TLB Modified",
54
54
        "TLB Invalid",
73
73
 
74
74
static void print_regdump(istate_t *istate)
75
75
{
76
 
        char *pcsymbol, *rasymbol;
77
 
 
78
 
        pcsymbol = symtab_fmt_name_lookup(istate->epc);
79
 
        rasymbol = symtab_fmt_name_lookup(istate->ra);
80
 
 
 
76
        const char *pcsymbol = symtab_fmt_name_lookup(istate->epc);
 
77
        const char *rasymbol = symtab_fmt_name_lookup(istate->ra);
 
78
        
81
79
        printf("PC: %#x(%s) RA: %#x(%s), SP(%p)\n", istate->epc, pcsymbol,
82
80
            istate->ra, rasymbol, istate->sp);
83
81
}
92
90
 
93
91
static void reserved_instr_exception(int n, istate_t *istate)
94
92
{
95
 
        if (*((uint32_t *)istate->epc) == 0x7c03e83b) {
 
93
        if (*((uint32_t *) istate->epc) == 0x7c03e83b) {
96
94
                ASSERT(THREAD);
97
95
                istate->epc += 4;
98
96
                istate->v1 = istate->k1;
99
 
        } else 
 
97
        } else
100
98
                unhandled_exception(n, istate);
101
99
}
102
100