Commit 26f7ff2e authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] dump_stack() cleanup, BK-curr

This modifies x86's dump_stack() to print out just the backtrace, not
the stack contents.  The patch also adds one more whitespace after the
numeric EIP value.  The old dump looked this way:

  bad: scheduling while atomic!
  Stack: ffffffff c041c72f 0000006a 00000068 000000f0 c13e1f28 c04c49c0 c13e1f28
         c02a4099 c04c49c0 000000f0 00000000 00003104 c012592e 00003104 00003104
         ffffffff 34000286 00000282 00000000 00000000 c13e1f28 c04c49c0 c04c4468
  Call Trace:
   [<c011f009>]sys_gettimeofday+0x89/0x90
   [<c0113e40>]do_page_fault+0x0/0x49e
   [<c0107d63>]syscall_call+0x7/0xb

the new output is:

  bad: scheduling while atomic!
  Call Trace:
   [<c011f009>] sys_gettimeofday+0x89/0x90
   [<c0113e40>] do_page_fault+0x0/0x49e
   [<c0107d63>] syscall_call+0x7/0xb

much nicer and much more compact.
parent 76c405d4
......@@ -144,7 +144,7 @@ void show_trace(unsigned long * stack)
while (((long) stack & (THREAD_SIZE-1)) != 0) {
addr = *stack++;
if (kernel_text_address(addr)) {
printk(" [<%08lx>]", addr);
printk(" [<%08lx>] ", addr);
print_symbol("%s\n", addr);
}
}
......@@ -189,7 +189,9 @@ void show_stack(unsigned long * esp)
*/
void dump_stack(void)
{
show_stack(0);
unsigned long stack;
show_trace(&stack);
}
void show_registers(struct pt_regs *regs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment