From: Randy Dunlap Print summary registers (EIP and SS:ESP only) as last death info. This makes this important data visible in case it had scrolled off the top of the display. Similar to what x86_64 does. Suggested by Andi Kleen. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton --- arch/i386/kernel/traps.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) diff -puN arch/i386/kernel/traps.c~i386-print-eip-esp-last arch/i386/kernel/traps.c --- 25/arch/i386/kernel/traps.c~i386-print-eip-esp-last Mon Apr 3 15:52:54 2006 +++ 25-akpm/arch/i386/kernel/traps.c Mon Apr 3 15:52:54 2006 @@ -365,6 +365,9 @@ void die(const char * str, struct pt_reg if (++die.lock_owner_depth < 3) { int nl = 0; + unsigned long esp; + unsigned short ss; + handle_BUG(regs); printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); #ifdef CONFIG_PREEMPT @@ -388,8 +391,19 @@ void die(const char * str, struct pt_reg sysfs_printk_last_file(); if (notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV) != - NOTIFY_STOP) + NOTIFY_STOP) { show_registers(regs); + /* Executive summary in case the oops scrolled away */ + esp = (unsigned long) (®s->esp); + savesegment(ss, ss); + if (user_mode(regs)) { + esp = regs->esp; + ss = regs->xss & 0xffff; + } + printk(KERN_EMERG "EIP: [<%08lx>] ", regs->eip); + print_symbol("%s", regs->eip); + printk(" SS:ESP %04x:%08lx\n", ss, esp); + } else regs = NULL; } else _