[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] make x86-64 stack dump readable
On an 80-columns-wide terminal, the stack dump wrapped in an ugly way (as its basic structure was appearantly based on i386 assumptions). Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- /home/jbeulich/src/xen/2005-08-22/xen/arch/x86/traps.c 2005-08-21 02:34:41.000000000 +0200 +++ 2005-08-22/xen/arch/x86/traps.c 2005-08-26 09:52:44.000000000 +0200 @@ -100,6 +100,7 @@ unsigned long do_get_debugreg(int reg); static int debug_stack_lines = 20; integer_param("debug_stack_lines", debug_stack_lines); +static const int debug_stack_items = 32 / sizeof(unsigned long); int is_kernel_text(unsigned long addr) { @@ -125,7 +126,7 @@ void show_guest_stack(void) printk("Guest stack trace from "__OP"sp=%p:\n ", stack); - for ( i = 0; i < (debug_stack_lines*8); i++ ) + for ( i = 0; i < (debug_stack_lines * debug_stack_items); i++ ) { if ( ((long)stack & (STACK_SIZE-1)) == 0 ) break; @@ -137,7 +138,7 @@ void show_guest_stack(void) i = 1; break; } - if ( (i != 0) && ((i % 8) == 0) ) + if ( (i != 0) && ((i % debug_stack_items) == 0) ) printk("\n "); printk("%p ", _p(addr)); stack++; @@ -176,11 +177,11 @@ void show_stack(unsigned long *esp) printk("Xen stack trace from "__OP"sp=%p:\n ", stack); - for ( i = 0; i < (debug_stack_lines*8); i++ ) + for ( i = 0; i < (debug_stack_lines * debug_stack_items); i++ ) { if ( ((long)stack & (STACK_SIZE-1)) == 0 ) break; - if ( (i != 0) && ((i % 8) == 0) ) + if ( (i != 0) && ((i % debug_stack_items) == 0) ) printk("\n "); addr = *stack++; printk("%p ", _p(addr)); Attachment:
xen-x86_64-readable-stack-dump.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |