[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix x86/64 Xen register and stack dumps so they don't



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 872e94f8eb6944d61d16b7e097f9b613fd52fc4e
# Parent  f0bf239844a66f1cd0b8bbf112e1acd73996cae1
Fix x86/64 Xen register and stack dumps so they don't
wrap on an 80-column display.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

diff -r f0bf239844a6 -r 872e94f8eb69 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Tue Aug 30 16:19:07 2005
+++ b/xen/arch/x86/traps.c      Tue Aug 30 16:44:05 2005
@@ -100,6 +100,7 @@
 
 static int debug_stack_lines = 20;
 integer_param("debug_stack_lines", debug_stack_lines);
+#define stack_words_per_line (32 / BYTES_PER_LONG)
 
 int is_kernel_text(unsigned long addr)
 {
@@ -125,7 +126,7 @@
 
     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*stack_words_per_line); i++ )
     {
         if ( ((long)stack & (STACK_SIZE-1)) == 0 )
             break;
@@ -137,7 +138,7 @@
             i = 1;
             break;
         }
-        if ( (i != 0) && ((i % 8) == 0) )
+        if ( (i != 0) && ((i % stack_words_per_line) == 0) )
             printk("\n   ");
         printk("%p ", _p(addr));
         stack++;
@@ -176,11 +177,11 @@
 
     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*stack_words_per_line); i++ )
     {
         if ( ((long)stack & (STACK_SIZE-1)) == 0 )
             break;
-        if ( (i != 0) && ((i % 8) == 0) )
+        if ( (i != 0) && ((i % stack_words_per_line) == 0) )
             printk("\n   ");
         addr = *stack++;
         printk("%p ", _p(addr));
diff -r f0bf239844a6 -r 872e94f8eb69 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c       Tue Aug 30 16:19:07 2005
+++ b/xen/arch/x86/x86_64/traps.c       Tue Aug 30 16:44:05 2005
@@ -15,19 +15,22 @@
 
 void show_registers(struct cpu_user_regs *regs)
 {
-    printk("CPU:    %d\nEIP:    %04x:[<%016lx>]",
+    printk("CPU:    %d\nRIP:    %04x:[<%016lx>]",
            smp_processor_id(), 0xffff & regs->cs, regs->rip);
     if ( !GUEST_MODE(regs) )
         print_symbol(" %s", regs->rip);
-    printk("\nEFLAGS: %016lx\n", regs->eflags);
-    printk("rax: %016lx   rbx: %016lx   rcx: %016lx   rdx: %016lx\n",
-           regs->rax, regs->rbx, regs->rcx, regs->rdx);
-    printk("rsi: %016lx   rdi: %016lx   rbp: %016lx   rsp: %016lx\n",
-           regs->rsi, regs->rdi, regs->rbp, regs->rsp);
-    printk("r8:  %016lx   r9:  %016lx   r10: %016lx   r11: %016lx\n",
-           regs->r8,  regs->r9,  regs->r10, regs->r11);
-    printk("r12: %016lx   r13: %016lx   r14: %016lx   r15: %016lx\n",
-           regs->r12, regs->r13, regs->r14, regs->r15);
+    printk("\nRFLAGS: %016lx\n", regs->eflags);
+    printk("rax: %016lx   rbx: %016lx   rcx: %016lx\n",
+           regs->rax, regs->rbx, regs->rcx);
+    printk("rdx: %016lx   rsi: %016lx   rdi: %016lx\n",
+           regs->rdx, regs->rsi, regs->rdi);
+    printk("rbp: %016lx   rsp: %016lx   r8:  %016lx\n",
+           regs->rbp, regs->rsp, regs->r8);
+    printk("r9:  %016lx   r10: %016lx   r11: %016lx\n",
+           regs->r9,  regs->r10, regs->r11);
+    printk("r12: %016lx   r13: %016lx   r14: %016lx\n",
+           regs->r12, regs->r13, regs->r14);
+    printk("r15: %016lx\n", regs->r15);
 
     if ( GUEST_MODE(regs) )
         show_guest_stack();

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.