Changeset 43b1e86 in mainline for kernel/arch


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

Location:
kernel/arch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/debugger.c

    racfdcb0 r43b1e86  
    105105int cmd_print_breakpoints(cmd_arg_t *argv __attribute__((unused)))
    106106{
    107         int i;
     107        unsigned int i;
    108108        char *symbol;
    109 
    110         printf("Breakpoint table.\n");
    111         for (i=0; i < BKPOINTS_MAX; i++)
     109       
     110        if (sizeof(void *) == 4) {
     111                printf("#  Count Address    In symbol\n");
     112                printf("-- ----- ---------- ---------\n");
     113        } else {
     114                printf("#  Count Address            In symbol\n");
     115                printf("-- ----- ------------------ ---------\n");
     116        }
     117       
     118        for (i = 0; i < BKPOINTS_MAX; i++)
    112119                if (breakpoints[i].address) {
    113120                        symbol = get_symtab_entry(breakpoints[i].address);
    114                         printf("%d. %lx in %s\n", i,
    115                                breakpoints[i].address, symbol);
    116                         printf("     Count(%d) ", breakpoints[i].counter);
    117                         printf("\n");
     121                       
     122                        if (sizeof(void *) == 4)
     123                                printf("%-2u %-5d %#10zx %s\n", i, breakpoints[i].counter,
     124                                        breakpoints[i].address, symbol);
     125                        else
     126                                printf("%-2u %-5d %#18zx %s\n", i, breakpoints[i].counter,
     127                                        breakpoints[i].address, symbol);
    118128                }
    119129        return 1;
  • kernel/arch/ia32/src/mm/frame.c

    racfdcb0 r43b1e86  
    9797static int cmd_e820mem(cmd_arg_t *argv)
    9898{
    99         int i;
     99        unsigned int i;
    100100        char *name;
    101 
     101       
     102        printf("Base               Size               Name\n");
     103        printf("------------------ ------------------ ---------\n");
     104               
    102105        for (i = 0; i < e820counter; i++) {
    103106                if (e820table[i].type <= MEMMAP_MEMORY_UNUSABLE)
     
    105108                else
    106109                        name = "invalid";
    107                 printf("%.*p %#.16llXB %s\n", sizeof(unative_t) * 2,
    108                     (unative_t) e820table[i].base_address,
    109                     (uint64_t) e820table[i].size, name);
     110               
     111                printf("%#18llx %#18llx %s\n", e820table[i].base_address,
     112                        e820table[i].size, name);
    110113        }                       
    111114        return 0;
Note: See TracChangeset for help on using the changeset viewer.