Changeset 7e752b2 in mainline for kernel/arch/mips32/src


Ignore:
Timestamp:
2010-11-26T01:33:20Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf61d3a
Parents:
202f57b
Message:
  • correct printf() formatting strings and corresponding arguments
  • minor cstyle changes and other small fixes
Location:
kernel/arch/mips32/src
Files:
4 edited

Legend:

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

    r202f57b r7e752b2  
    3939void cache_error(istate_t *istate)
    4040{
    41         panic("cache_error exception (epc=%p).", istate->epc);
     41        panic("cache_error exception (epc=%p).", (void *) istate->epc);
    4242}
    4343
  • kernel/arch/mips32/src/debugger.c

    r202f57b r7e752b2  
    191191        }
    192192       
    193         printf("Adding breakpoint on address %p\n", argv->intval);
     193        printf("Adding breakpoint on address %p\n", (void *) argv->intval);
    194194       
    195195        cur->address = (uintptr_t) argv->intval;
     
    267267                            breakpoints[i].address);
    268268                       
    269                         printf("%-4u %7" PRIs " %p %-8s %-9s %-10s %s\n", i,
    270                             breakpoints[i].counter, breakpoints[i].address,
     269                        printf("%-4u %7zu %p %-8s %-9s %-10s %s\n", i,
     270                            breakpoints[i].counter, (void *) breakpoints[i].address,
    271271                            ((breakpoints[i].flags & BKPOINT_INPROG) ? "true" :
    272272                            "false"), ((breakpoints[i].flags & BKPOINT_ONESHOT)
     
    366366               
    367367                if (!(cur->flags & BKPOINT_FUNCCALL)) {
    368                         printf("***Breakpoint %u: %p in %s.\n", i, fireaddr,
     368                        printf("***Breakpoint %u: %p in %s.\n", i,
     369                            (void *) fireaddr,
    369370                            symtab_fmt_name_lookup(fireaddr));
    370371                }
     
    381382                cur->flags |= BKPOINT_INPROG;
    382383        } else {
    383                 printf("***Breakpoint %d: %p in %s.\n", i, fireaddr,
     384                printf("***Breakpoint %d: %p in %s.\n", i,
     385                    (void *) fireaddr,
    384386                    symtab_fmt_name_lookup(fireaddr));
    385387               
  • kernel/arch/mips32/src/exception.c

    r202f57b r7e752b2  
    7474void istate_decode(istate_t *istate)
    7575{
    76         printf("epc=%p\tsta=%p\tlo =%p\thi =%p\n",
    77             istate->epc, istate->status, istate->lo, istate->hi);
    78         printf("a0 =%p\ta1 =%p\ta2 =%p\ta3 =%p\n",
     76        printf("epc=%p\tsta=%#0" PRIx32 "\t"
     77            "lo =%#0" PRIx32 "\thi =%#0" PRIx32 "\n",
     78            (void *) istate->epc, istate->status,
     79            istate->lo, istate->hi);
     80       
     81        printf("a0 =%#0" PRIx32 "\ta1 =%#0" PRIx32 "\t"
     82            "a2 =%#0" PRIx32 "\ta3 =%#0" PRIx32 "\n",
    7983            istate->a0, istate->a1, istate->a2, istate->a3);
    80         printf("t0 =%p\tt1 =%p\tt2 =%p\tt3 =%p\n",
     84       
     85        printf("t0 =%#0" PRIx32 "\tt1 =%#0" PRIx32 "\t"
     86            "t2 =%#0" PRIx32 "\tt3 =%#0" PRIx32 "\n",
    8187            istate->t0, istate->t1, istate->t2, istate->t3);
    82         printf("t4 =%p\tt5 =%p\tt6 =%p\tt7 =%p\n",
     88       
     89        printf("t4 =%#0" PRIx32 "\tt5 =%#0" PRIx32 "\t"
     90            "t6 =%#0" PRIx32 "\tt7 =%#0" PRIx32 "\n",
    8391            istate->t4, istate->t5, istate->t6, istate->t7);
    84         printf("t8 =%p\tt9 =%p\tv0 =%p\tv1 =%p\n",
     92       
     93        printf("t8 =%#0" PRIx32 "\tt9 =%#0" PRIx32 "\t"
     94            "v0 =%#0" PRIx32 "\tv1 =%#0" PRIx32 "\n",
    8595            istate->t8, istate->t9, istate->v0, istate->v1);
    86         printf("s0 =%p\ts1 =%p\ts2 =%p\ts3 =%p\n",
     96       
     97        printf("s0 =%#0" PRIx32 "\ts1 =%#0" PRIx32 "\t"
     98            "s2 =%#0" PRIx32 "\ts3 =%#0" PRIx32 "\n",
    8799            istate->s0, istate->s1, istate->s2, istate->s3);
    88         printf("s4 =%p\ts5 =%p\ts6 =%p\ts7 =%p\n",
     100       
     101        printf("s4 =%#0" PRIx32 "\ts5 =%#0" PRIx32 "\t"
     102            "s6 =%#0" PRIx32 "\ts7 =%#0" PRIx32 "\n",
    89103            istate->s4, istate->s5, istate->s6, istate->s7);
    90         printf("s8 =%p\tat =%p\tkt0=%p\tkt1=%p\n",
     104       
     105        printf("s8 =%#0" PRIx32 "\tat =%#0" PRIx32 "\t"
     106            "kt0=%#0" PRIx32 "\tkt1=%#0" PRIx32 "\n",
    91107            istate->s8, istate->at, istate->kt0, istate->kt1);
     108       
    92109        printf("sp =%p\tra =%p\tgp =%p\n",
    93             istate->sp, istate->ra, istate->gp);
     110            (void *) istate->sp, (void *) istate->ra,
     111            (void *) istate->gp);
    94112}
    95113
  • kernel/arch/mips32/src/mm/tlb.c

    r202f57b r7e752b2  
    323323        uintptr_t va = cp0_badvaddr_read();
    324324       
    325         fault_if_from_uspace(istate, "TLB Refill Exception on %p.", va);
     325        fault_if_from_uspace(istate, "TLB Refill Exception on %p.",
     326            (void *) va);
    326327        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Refill Exception.");
    327328}
     
    332333        uintptr_t va = cp0_badvaddr_read();
    333334       
    334         fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", va);
     335        fault_if_from_uspace(istate, "TLB Invalid Exception on %p.",
     336            (void *) va);
    335337        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Invalid Exception.");
    336338}
     
    340342        uintptr_t va = cp0_badvaddr_read();
    341343       
    342         fault_if_from_uspace(istate, "TLB Modified Exception on %p.", va);
     344        fault_if_from_uspace(istate, "TLB Modified Exception on %p.",
     345            (void *) va);
    343346        panic_memtrap(istate, PF_ACCESS_WRITE, va, "TLB Modified Exception.");
    344347}
Note: See TracChangeset for help on using the changeset viewer.