/trunk/kernel/arch/amd64/src/debugger.c |
---|
104,27 → 104,17 |
/** Print table of active breakpoints */ |
int cmd_print_breakpoints(cmd_arg_t *argv __attribute__((unused))) |
{ |
unsigned int i; |
int i; |
char *symbol; |
if (sizeof(void *) == 4) { |
printf("# Count Address In symbol\n"); |
printf("-- ----- ---------- ---------\n"); |
} else { |
printf("# Count Address In symbol\n"); |
printf("-- ----- ------------------ ---------\n"); |
} |
for (i = 0; i < BKPOINTS_MAX; i++) |
printf("Breakpoint table.\n"); |
for (i=0; i < BKPOINTS_MAX; i++) |
if (breakpoints[i].address) { |
symbol = get_symtab_entry(breakpoints[i].address); |
if (sizeof(void *) == 4) |
printf("%-2u %-5d %#10zx %s\n", i, breakpoints[i].counter, |
breakpoints[i].address, symbol); |
else |
printf("%-2u %-5d %#18zx %s\n", i, breakpoints[i].counter, |
breakpoints[i].address, symbol); |
printf("%d. %lx in %s\n", i, |
breakpoints[i].address, symbol); |
printf(" Count(%d) ", breakpoints[i].counter); |
printf("\n"); |
} |
return 1; |
} |
/trunk/kernel/arch/ia32/src/mm/frame.c |
---|
96,20 → 96,17 |
static int cmd_e820mem(cmd_arg_t *argv) |
{ |
unsigned int i; |
int i; |
char *name; |
printf("Base Size Name\n"); |
printf("------------------ ------------------ ---------\n"); |
for (i = 0; i < e820counter; i++) { |
if (e820table[i].type <= MEMMAP_MEMORY_UNUSABLE) |
name = e820names[e820table[i].type]; |
else |
name = "invalid"; |
printf("%#18llx %#18llx %s\n", e820table[i].base_address, |
e820table[i].size, name); |
printf("%.*p %#.16llXB %s\n", sizeof(unative_t) * 2, |
(unative_t) e820table[i].base_address, |
(uint64_t) e820table[i].size, name); |
} |
return 0; |
} |
/trunk/kernel/generic/src/mm/frame.c |
---|
1120,29 → 1120,15 |
ipl = interrupts_disable(); |
spinlock_lock(&zones.lock); |
if (sizeof(void *) == 4) { |
printf("# base address free frames busy frames\n"); |
printf("-- ------------ ------------ ------------\n"); |
} else { |
printf("# base address free frames busy frames\n"); |
printf("-- -------------------- ------------ ------------\n"); |
} |
printf("# base address free frames busy frames\n"); |
printf("-- ------------ ------------ ------------\n"); |
for (i = 0; i < zones.count; i++) { |
zone = zones.info[i]; |
spinlock_lock(&zone->lock); |
if (sizeof(void *) == 4) |
printf("%-2d %#10zx %12zd %12zd\n", i, PFN2ADDR(zone->base), |
zone->free_count, zone->busy_count); |
else |
printf("%-2d %#18zx %12zd %12zd\n", i, PFN2ADDR(zone->base), |
zone->free_count, zone->busy_count); |
printf("%-2d %12p %12zd %12zd\n", i, PFN2ADDR(zone->base), |
zone->free_count, zone->busy_count); |
spinlock_unlock(&zone->lock); |
} |
spinlock_unlock(&zones.lock); |
interrupts_restore(ipl); |
} |
/trunk/kernel/generic/src/proc/task.c |
---|
420,15 → 420,10 |
uint64_t cycles; |
char suffix; |
order(task_get_accounting(t), &cycles, &suffix); |
if (sizeof(void *) == 4) |
printf("%-6llu %-10s %-3ld %#10zx %#10zx %9llu%c %7zd %6zd", |
t->taskid, t->name, t->context, t, t->as, cycles, suffix, |
t->refcount, atomic_get(&t->active_calls)); |
else |
printf("%-6llu %-10s %-3ld %#18zx %#18zx %9llu%c %7zd %6zd", |
t->taskid, t->name, t->context, t, t->as, cycles, suffix, |
t->refcount, atomic_get(&t->active_calls)); |
printf("%-6llu %-10s %-3ld %#10zx %#10zx %9llu%c %7zd %6zd", |
t->taskid, t->name, t->context, t, t->as, cycles, suffix, |
t->refcount, atomic_get(&t->active_calls)); |
for (j = 0; j < IPC_MAX_PHONES; j++) { |
if (t->phones[j].callee) |
printf(" %zd:%#zx", j, t->phones[j].callee); |
448,17 → 443,10 |
ipl = interrupts_disable(); |
spinlock_lock(&tasks_lock); |
if (sizeof(void *) == 4) { |
printf("taskid name ctx address as " |
"cycles threads calls callee\n"); |
printf("------ ---------- --- ---------- ---------- " |
"---------- ------- ------ ------>\n"); |
} else { |
printf("taskid name ctx address as " |
"cycles threads calls callee\n"); |
printf("------ ---------- --- ------------------ ------------------ " |
"---------- ------- ------ ------>\n"); |
} |
printf("taskid name ctx address as cycles threads " |
"calls callee\n"); |
printf("------ ---------- --- ---------- ---------- ---------- ------- " |
"------ ------>\n"); |
avltree_walk(&tasks_tree, task_print_walker, NULL); |
/trunk/kernel/generic/src/proc/thread.c |
---|
586,27 → 586,18 |
uint64_t cycles; |
char suffix; |
order(t->cycles, &cycles, &suffix); |
if (sizeof(void *) == 4) |
printf("%-6llu %-10s %#10zx %-8s %#10zx %-3ld %#10zx %#10zx %9llu%c ", |
t->tid, t->name, t, thread_states[t->state], t->task, |
t->task->context, t->thread_code, t->kstack, cycles, suffix); |
else |
printf("%-6llu %-10s %#18zx %-8s %#18zx %-3ld %#18zx %#18zx %9llu%c ", |
t->tid, t->name, t, thread_states[t->state], t->task, |
t->task->context, t->thread_code, t->kstack, cycles, suffix); |
printf("%-6llu %-10s %#10zx %-8s %#10zx %-3ld %#10zx %#10zx %9llu%c ", |
t->tid, t->name, t, thread_states[t->state], t->task, |
t->task->context, t->thread_code, t->kstack, cycles, suffix); |
if (t->cpu) |
printf("%-4zd", t->cpu->id); |
else |
printf("none"); |
if (t->state == Sleeping) { |
if (sizeof(uintptr_t) == 4) |
printf(" %#10zx", t->sleep_queue); |
else |
printf(" %#18zx", t->sleep_queue); |
} |
if (t->state == Sleeping) |
printf(" %#10zx", t->sleep_queue); |
printf("\n"); |
622,21 → 613,10 |
ipl = interrupts_disable(); |
spinlock_lock(&threads_lock); |
if (sizeof(uintptr_t) == 4) { |
printf("tid name address state task " |
"ctx code stack cycles cpu " |
"waitqueue\n"); |
printf("------ ---------- ---------- -------- ---------- " |
"--- ---------- ---------- ---------- ---- " |
"----------\n"); |
} else { |
printf("tid name address state task " |
"ctx code stack cycles cpu " |
"waitqueue\n"); |
printf("------ ---------- ------------------ -------- ------------------ " |
"--- ------------------ ------------------ ---------- ---- " |
"------------------\n"); |
} |
printf("tid name address state task ctx code " |
" stack cycles cpu waitqueue\n"); |
printf("------ ---------- ---------- -------- ---------- --- --------" |
"-- ---------- ---------- ---- ---------\n"); |
avltree_walk(&threads_tree, thread_walker, NULL); |
/trunk/kernel/generic/src/printf/printf_core.c |
---|
458,7 → 458,7 |
* |
* - u Print unsigned decimal number. |
* |
* - X, x Print hexadecimal number with upper- or lower-case. Prefix is |
* - X, x Print hexadecimal number with upper- or lower-case. Prefix isi |
* not printed by default. |
* |
* All other characters from fmt except the formatting directives are printed in |
/trunk/kernel/generic/src/interrupt/interrupt.c |
---|
103,33 → 103,19 |
/** kconsole cmd - print all exceptions */ |
static int exc_print_cmd(cmd_arg_t *argv) |
{ |
unsigned int i; |
int i; |
char *symbol; |
spinlock_lock(&exctbl_lock); |
if (sizeof(void *) == 4) { |
printf("Exc Description Handler Symbol\n"); |
printf("--- ------------ ---------- --------\n"); |
} else { |
printf("Exc Description Handler Symbol\n"); |
printf("--- ------------ ------------------ --------\n"); |
} |
for (i = 0; i < IVT_ITEMS; i++) { |
symbol = get_symtab_entry((unative_t) exc_table[i].f); |
printf("Exc Description Handler\n"); |
for (i=0; i < IVT_ITEMS; i++) { |
symbol = get_symtab_entry((unative_t)exc_table[i].f); |
if (!symbol) |
symbol = "not found"; |
if (sizeof(void *) == 4) |
printf("%-3u %-12s %#10zx %s\n", i + IVT_FIRST, exc_table[i].name, |
exc_table[i].f, symbol); |
else |
printf("%-3u %-12s %#18zx %s\n", i + IVT_FIRST, exc_table[i].name, |
exc_table[i].f, symbol); |
if (((i + 1) % 20) == 0) { |
printf(" -- Press any key to continue -- "); |
printf("%d %s %.*p(%s)\n", i + IVT_FIRST, exc_table[i].name, |
sizeof(uintptr_t) * 2, exc_table[i].f,symbol); |
if (!((i+1) % 20)) { |
printf("Press any key to continue."); |
spinlock_unlock(&exctbl_lock); |
getc(stdin); |
spinlock_lock(&exctbl_lock); |
136,7 → 122,6 |
printf("\n"); |
} |
} |
spinlock_unlock(&exctbl_lock); |
return 1; |
/trunk/kernel/generic/include/macros.h |
---|
62,7 → 62,6 |
return (s1 < e2) && (s2 < e1); |
} |
/* Compute overlapping of physical addresses */ |
#define PA_overlaps(x, szx, y, szy) overlaps(KA2PA(x), szx, KA2PA(y), szy) |