ia64/xen-unstable

changeset 201:7e1893c8ae92

bitkeeper revision 1.62 (3e50cb4eg-PMPCWTPi41yy_fZzVykw)

page.h, traps.c:
Improve BUG tracing. We now get registers + stack.
author kaf24@labyrinth.cl.cam.ac.uk
date Mon Feb 17 11:45:18 2003 +0000 (2003-02-17)
parents c6670740ac0e
children 4b4303cad624
files xen-2.4.16/arch/i386/traps.c xen-2.4.16/include/asm-i386/page.h
line diff
     1.1 --- a/xen-2.4.16/arch/i386/traps.c	Mon Feb 17 11:21:54 2003 +0000
     1.2 +++ b/xen-2.4.16/arch/i386/traps.c	Mon Feb 17 11:45:18 2003 +0000
     1.3 @@ -119,6 +119,8 @@ void show_stack(unsigned long * esp)
     1.4      if(esp==NULL)
     1.5          esp=(unsigned long*)&esp;
     1.6  
     1.7 +    printk("Stack trace from ESP=%p:\n", esp);
     1.8 +
     1.9      stack = esp;
    1.10      for(i=0; i < kstack_depth_to_print; i++) {
    1.11          if (((long) stack & (THREAD_SIZE-1)) == 0)
    1.12 @@ -128,7 +130,7 @@ void show_stack(unsigned long * esp)
    1.13          printk("%08lx ", *stack++);
    1.14      }
    1.15      printk("\n");
    1.16 -    show_trace(esp);
    1.17 +    //show_trace(esp);
    1.18  }
    1.19  
    1.20  void show_registers(struct pt_regs *regs)
    1.21 @@ -152,6 +154,8 @@ void show_registers(struct pt_regs *regs
    1.22             regs->esi, regs->edi, regs->ebp, esp);
    1.23      printk("ds: %04x   es: %04x   ss: %04x\n",
    1.24             regs->xds & 0xffff, regs->xes & 0xffff, ss);
    1.25 +
    1.26 +    show_stack(&regs->esp);
    1.27  }	
    1.28  
    1.29  
     2.1 --- a/xen-2.4.16/include/asm-i386/page.h	Mon Feb 17 11:21:54 2003 +0000
     2.2 +++ b/xen-2.4.16/include/asm-i386/page.h	Mon Feb 17 11:45:18 2003 +0000
     2.3 @@ -3,16 +3,10 @@
     2.4  
     2.5  
     2.6  #ifndef __ASSEMBLY__
     2.7 -#ifdef CONFIG_DEBUG_BUGVERBOSE
     2.8 -extern void do_BUG(const char *file, int line);
     2.9  #define BUG() do {					\
    2.10 -	do_BUG(__FILE__, __LINE__);			\
    2.11 +	printk("BUG at %s:%d\n", __FILE__, __LINE__);	\
    2.12  	__asm__ __volatile__("ud2");			\
    2.13  } while (0)
    2.14 -#else
    2.15 -#include <xeno/lib.h>
    2.16 -#define BUG() (panic("BUG at %s:%d\n", __FILE__, __LINE__))
    2.17 -#endif
    2.18  #endif /* __ASSEMBLY__ */
    2.19  
    2.20