sysrq.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2001 - 2003 Jeff Dike (jdike@addtoit.com)
  3. * Licensed under the GPL
  4. */
  5. #include "linux/kernel.h"
  6. #include "linux/smp.h"
  7. #include "linux/sched.h"
  8. #include "asm/ptrace.h"
  9. #include "sysrq.h"
  10. void show_regs(struct pt_regs *regs)
  11. {
  12. printk("\n");
  13. printk("EIP: %04lx:[<%08lx>] CPU: %d %s",
  14. 0xffff & PT_REGS_CS(regs), PT_REGS_IP(regs),
  15. smp_processor_id(), print_tainted());
  16. if (PT_REGS_CS(regs) & 3)
  17. printk(" ESP: %04lx:%08lx", 0xffff & PT_REGS_SS(regs),
  18. PT_REGS_SP(regs));
  19. printk(" EFLAGS: %08lx\n %s\n", PT_REGS_EFLAGS(regs),
  20. print_tainted());
  21. printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  22. PT_REGS_EAX(regs), PT_REGS_EBX(regs),
  23. PT_REGS_ECX(regs),
  24. PT_REGS_EDX(regs));
  25. printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  26. PT_REGS_ESI(regs), PT_REGS_EDI(regs),
  27. PT_REGS_EBP(regs));
  28. printk(" DS: %04lx ES: %04lx\n",
  29. 0xffff & PT_REGS_DS(regs),
  30. 0xffff & PT_REGS_ES(regs));
  31. show_trace((unsigned long *) &regs);
  32. }