From: James S. <jsi...@us...> - 2001-11-27 17:45:20
|
Update of /cvsroot/linux-mips/linux/arch/mips/kernel In directory usw-pr-cvs1:/tmp/cvs-serv9081 Modified Files: traps.c Log Message: Implement show_registers() along the lines of i386. Index: traps.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/traps.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- traps.c 2001/11/26 18:53:57 1.26 +++ traps.c 2001/11/27 17:45:17 1.27 @@ -314,17 +314,8 @@ regs->cp0_cause); } -spinlock_t die_lock; - -extern void __die(const char * str, struct pt_regs * regs, const char *where, - unsigned long line) +void show_registers(struct pt_regs *regs) { - console_verbose(); - spin_lock_irq(&die_lock); - printk("%s", str); - if (where) - printk(" in %s, line %ld", where, line); - printk(":\n"); show_regs(regs); printk("Process %s (pid: %d, stackpage=%08lx)\n", current->comm, current->pid, (unsigned long) current); @@ -332,6 +323,20 @@ show_trace((unsigned int *) regs->regs[29]); show_code((unsigned int *) regs->cp0_epc); printk("\n"); +} + +spinlock_t die_lock = SPIN_LOCK_UNLOCKED; + +void __die(const char * str, struct pt_regs * regs, const char *where, + unsigned long line) +{ + console_verbose(); + spin_lock_irq(&die_lock); + printk("%s", str); + if (where) + printk(" in %s, line %ld", where, line); + printk(":\n"); + show_registers(regs); spin_unlock_irq(&die_lock); do_exit(SIGSEGV); } |