Ignore:
Timestamp:
2008-02-01T14:11:18Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9652bd59
Parents:
acfdcb0
Message:

prettyprint output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/interrupt/interrupt.c

    racfdcb0 r43b1e86  
    104104static int exc_print_cmd(cmd_arg_t *argv)
    105105{
    106         int i;
     106        unsigned int i;
    107107        char *symbol;
    108108
    109109        spinlock_lock(&exctbl_lock);
    110         printf("Exc Description Handler\n");
    111         for (i=0; i < IVT_ITEMS; i++) {
    112                 symbol = get_symtab_entry((unative_t)exc_table[i].f);
     110       
     111        if (sizeof(void *) == 4) {
     112                printf("Exc Description  Handler    Symbol\n");
     113                printf("--- ------------ ---------- --------\n");
     114        } else {
     115                printf("Exc Description  Handler            Symbol\n");
     116                printf("--- ------------ ------------------ --------\n");
     117        }
     118       
     119        for (i = 0; i < IVT_ITEMS; i++) {
     120                symbol = get_symtab_entry((unative_t) exc_table[i].f);
    113121                if (!symbol)
    114122                        symbol = "not found";
    115                 printf("%d %s %.*p(%s)\n", i + IVT_FIRST, exc_table[i].name,
    116                        sizeof(uintptr_t) * 2, exc_table[i].f,symbol);           
    117                 if (!((i+1) % 20)) {
    118                         printf("Press any key to continue.");
     123               
     124                if (sizeof(void *) == 4)
     125                        printf("%-3u %-12s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name,
     126                                exc_table[i].f, symbol);
     127                else
     128                        printf("%-3u %-12s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name,
     129                                exc_table[i].f, symbol);
     130               
     131                if (((i + 1) % 20) == 0) {
     132                        printf(" -- Press any key to continue -- ");
    119133                        spinlock_unlock(&exctbl_lock);
    120134                        getc(stdin);
     
    123137                }
    124138        }
     139       
    125140        spinlock_unlock(&exctbl_lock);
    126141       
Note: See TracChangeset for help on using the changeset viewer.