2005-04-17 02:20:36 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003 PathScale, Inc.
|
|
|
|
*
|
|
|
|
* Licensed under the GPL
|
|
|
|
*/
|
|
|
|
|
2008-02-05 09:31:20 +03:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
#include <linux/utsname.h>
|
|
|
|
#include <asm/current.h>
|
|
|
|
#include <asm/ptrace.h>
|
2012-10-08 06:26:54 +04:00
|
|
|
#include <asm/sysrq.h>
|
2005-04-17 02:20:36 +04:00
|
|
|
|
2008-02-05 09:31:20 +03:00
|
|
|
void __show_regs(struct pt_regs *regs)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
|
|
|
printk("\n");
|
|
|
|
print_modules();
|
2008-02-05 09:31:20 +03:00
|
|
|
printk(KERN_INFO "Pid: %d, comm: %.20s %s %s\n", task_pid_nr(current),
|
2007-10-19 10:40:41 +04:00
|
|
|
current->comm, print_tainted(), init_utsname()->release);
|
2008-02-05 09:31:20 +03:00
|
|
|
printk(KERN_INFO "RIP: %04lx:[<%016lx>]\n", PT_REGS_CS(regs) & 0xffff,
|
2012-05-20 08:05:58 +04:00
|
|
|
PT_REGS_IP(regs));
|
2011-08-18 23:10:39 +04:00
|
|
|
printk(KERN_INFO "RSP: %016lx EFLAGS: %08lx\n", PT_REGS_SP(regs),
|
2005-04-17 02:20:36 +04:00
|
|
|
PT_REGS_EFLAGS(regs));
|
2008-02-05 09:31:20 +03:00
|
|
|
printk(KERN_INFO "RAX: %016lx RBX: %016lx RCX: %016lx\n",
|
2012-05-20 08:05:58 +04:00
|
|
|
PT_REGS_AX(regs), PT_REGS_BX(regs), PT_REGS_CX(regs));
|
2008-02-05 09:31:20 +03:00
|
|
|
printk(KERN_INFO "RDX: %016lx RSI: %016lx RDI: %016lx\n",
|
2012-05-20 08:05:58 +04:00
|
|
|
PT_REGS_DX(regs), PT_REGS_SI(regs), PT_REGS_DI(regs));
|
2008-02-05 09:31:20 +03:00
|
|
|
printk(KERN_INFO "RBP: %016lx R08: %016lx R09: %016lx\n",
|
2012-05-20 08:05:58 +04:00
|
|
|
PT_REGS_BP(regs), PT_REGS_R8(regs), PT_REGS_R9(regs));
|
2008-02-05 09:31:20 +03:00
|
|
|
printk(KERN_INFO "R10: %016lx R11: %016lx R12: %016lx\n",
|
2005-04-17 02:20:36 +04:00
|
|
|
PT_REGS_R10(regs), PT_REGS_R11(regs), PT_REGS_R12(regs));
|
2008-02-05 09:31:20 +03:00
|
|
|
printk(KERN_INFO "R13: %016lx R14: %016lx R15: %016lx\n",
|
2005-04-17 02:20:36 +04:00
|
|
|
PT_REGS_R13(regs), PT_REGS_R14(regs), PT_REGS_R15(regs));
|
|
|
|
}
|
|
|
|
|
|
|
|
void show_regs(struct pt_regs *regs)
|
|
|
|
{
|
|
|
|
__show_regs(regs);
|
2005-05-29 02:52:00 +04:00
|
|
|
show_trace(current, (unsigned long *) ®s);
|
2005-04-17 02:20:36 +04:00
|
|
|
}
|