Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (C) 2001 - 2003 Jeff Dike (jdike@addtoit.com)
0003  * Licensed under the GPL
0004  */
0005 
0006 #include <linux/kernel.h>
0007 #include <linux/smp.h>
0008 #include <linux/sched.h>
0009 #include <linux/sched/debug.h>
0010 #include <linux/kallsyms.h>
0011 #include <asm/ptrace.h>
0012 #include <asm/sysrq.h>
0013 
0014 /* This is declared by <linux/sched.h> */
0015 void show_regs(struct pt_regs *regs)
0016 {
0017         printk("\n");
0018         printk("EIP: %04lx:[<%08lx>] CPU: %d %s", 
0019            0xffff & PT_REGS_CS(regs), PT_REGS_IP(regs),
0020            smp_processor_id(), print_tainted());
0021         if (PT_REGS_CS(regs) & 3)
0022                 printk(" ESP: %04lx:%08lx", 0xffff & PT_REGS_SS(regs),
0023                PT_REGS_SP(regs));
0024         printk(" EFLAGS: %08lx\n    %s\n", PT_REGS_EFLAGS(regs),
0025            print_tainted());
0026         printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
0027                PT_REGS_AX(regs), PT_REGS_BX(regs), 
0028            PT_REGS_CX(regs), PT_REGS_DX(regs));
0029         printk("ESI: %08lx EDI: %08lx EBP: %08lx",
0030            PT_REGS_SI(regs), PT_REGS_DI(regs), PT_REGS_BP(regs));
0031         printk(" DS: %04lx ES: %04lx\n",
0032            0xffff & PT_REGS_DS(regs), 
0033            0xffff & PT_REGS_ES(regs));
0034 }