mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.62 (3e50cb4eg-PMPCWTPi41yy_fZzVykw)
page.h, traps.c: Improve BUG tracing. We now get registers + stack.
This commit is contained in:
1 parent
c7fc94b8a5
commit
7a4ebfbb40
2 files changed
+6
-8
No files matched your search
@@ -119,6 +119,8 @@ void show_stack(unsigned long * esp)
|
||||
if(esp==NULL)
|
||||
esp=(unsigned long*)&esp;
|
||||
|
||||
printk("Stack trace from ESP=%p:\n", esp);
|
||||
|
||||
stack = esp;
|
||||
for(i=0; i < kstack_depth_to_print; i++) {
|
||||
if (((long) stack & (THREAD_SIZE-1)) == 0)
|
||||
@@ -128,7 +130,7 @@ void show_stack(unsigned long * esp)
|
||||
printk("%08lx ", *stack++);
|
||||
}
|
||||
printk("\n");
|
||||
show_trace(esp);
|
||||
//show_trace(esp);
|
||||
}
|
||||
|
||||
void show_registers(struct pt_regs *regs)
|
||||
@@ -152,6 +154,8 @@ void show_registers(struct pt_regs *regs)
|
||||
regs->esi, regs->edi, regs->ebp, esp);
|
||||
printk("ds: %04x es: %04x ss: %04x\n",
|
||||
regs->xds & 0xffff, regs->xes & 0xffff, ss);
|
||||
|
||||
show_stack(®s->esp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,16 +3,10 @@
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
extern void do_BUG(const char *file, int line);
|
||||
#define BUG() do { \
|
||||
do_BUG(__FILE__, __LINE__); \
|
||||
printk("BUG at %s:%d\n", __FILE__, __LINE__); \
|
||||
__asm__ __volatile__("ud2"); \
|
||||
} while (0)
|
||||
#else
|
||||
#include <xeno/lib.h>
|
||||
#define BUG() (panic("BUG at %s:%d\n", __FILE__, __LINE__))
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
|
||||