ia64/xen-unstable

changeset 9584:7086a4e96ce0

With the standard (XEN) prefix and the setting of 8 words per line,
stack dumps on i386 came out at 81 characters per line. The change to
xen/arch/x86/traps.c makes this 80 (without changing the look on the
screen), and the change to xen/drivers/char/console.c arranges for
soft line breaks not getting duplicated by hard line breaks, so
displaying 80 characters per line doesn't result in a subsequent blank
line.

From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Apr 04 15:06:38 2006 +0100 (2006-04-04)
parents 8d08ad8256df
children 5baf152d63ef
files xen/arch/x86/traps.c xen/drivers/char/console.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Tue Apr 04 15:05:17 2006 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Tue Apr 04 15:06:38 2006 +0100
     1.3 @@ -138,13 +138,13 @@ static void show_guest_stack(struct cpu_
     1.4      if ( vm86_mode(regs) )
     1.5      {
     1.6          stack = (unsigned long *)((regs->ss << 4) + (regs->esp & 0xffff));
     1.7 -        printk("Guest stack trace from ss:sp = %04x:%04x (VM86)\n   ",
     1.8 +        printk("Guest stack trace from ss:sp = %04x:%04x (VM86)\n  ",
     1.9                 regs->ss, (uint16_t)(regs->esp & 0xffff));
    1.10      }
    1.11      else
    1.12      {
    1.13          stack = (unsigned long *)regs->esp;
    1.14 -        printk("Guest stack trace from "__OP"sp=%p:\n   ", stack);
    1.15 +        printk("Guest stack trace from "__OP"sp=%p:\n  ", stack);
    1.16      }
    1.17  
    1.18      for ( i = 0; i < (debug_stack_lines*stack_words_per_line); i++ )
    1.19 @@ -160,8 +160,8 @@ static void show_guest_stack(struct cpu_
    1.20              break;
    1.21          }
    1.22          if ( (i != 0) && ((i % stack_words_per_line) == 0) )
    1.23 -            printk("\n   ");
    1.24 -        printk("%p ", _p(addr));
    1.25 +            printk("\n  ");
    1.26 +        printk(" %p", _p(addr));
    1.27          stack++;
    1.28      }
    1.29      if ( i == 0 )
    1.30 @@ -257,16 +257,16 @@ void show_stack(struct cpu_user_regs *re
    1.31      if ( guest_mode(regs) )
    1.32          return show_guest_stack(regs);
    1.33  
    1.34 -    printk("Xen stack trace from "__OP"sp=%p:\n   ", stack);
    1.35 +    printk("Xen stack trace from "__OP"sp=%p:\n  ", stack);
    1.36  
    1.37      for ( i = 0; i < (debug_stack_lines*stack_words_per_line); i++ )
    1.38      {
    1.39          if ( ((long)stack & (STACK_SIZE-BYTES_PER_LONG)) == 0 )
    1.40              break;
    1.41          if ( (i != 0) && ((i % stack_words_per_line) == 0) )
    1.42 -            printk("\n   ");
    1.43 +            printk("\n  ");
    1.44          addr = *stack++;
    1.45 -        printk("%p ", _p(addr));
    1.46 +        printk(" %p", _p(addr));
    1.47      }
    1.48      if ( i == 0 )
    1.49          printk("Stack empty.");
     2.1 --- a/xen/drivers/char/console.c	Tue Apr 04 15:05:17 2006 +0100
     2.2 +++ b/xen/drivers/char/console.c	Tue Apr 04 15:06:38 2006 +0100
     2.3 @@ -200,10 +200,11 @@ static void putchar_console(int c)
     2.4      }
     2.5      else
     2.6      {
     2.7 +        if ( xpos >= COLUMNS )
     2.8 +            put_newline();
     2.9          video[(xpos + ypos * COLUMNS) * 2]     = c & 0xFF;
    2.10          video[(xpos + ypos * COLUMNS) * 2 + 1] = ATTRIBUTE;
    2.11 -        if ( ++xpos >= COLUMNS )
    2.12 -            put_newline();
    2.13 +        ++xpos;
    2.14      }
    2.15  }
    2.16