sysrq.c 1003 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (C) 2001 Chris Emerson (cemerson@chiark.greenend.org.uk)
  3. * Licensed under the GPL
  4. */
  5. #include <linux/kernel.h>
  6. #include <linux/smp.h>
  7. #include "asm/ptrace.h"
  8. #include "sysrq.h"
  9. void show_regs(struct pt_regs_subarch *regs)
  10. {
  11. printk("\n");
  12. show_regs_print_info(KERN_DEFAULT);
  13. printk("show_regs(): insert regs here.\n");
  14. #if 0
  15. printk("\n");
  16. printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs, regs->eip,
  17. smp_processor_id());
  18. if (regs->xcs & 3)
  19. printk(" ESP: %04x:%08lx",0xffff & regs->xss, regs->esp);
  20. printk(" EFLAGS: %08lx\n", regs->eflags);
  21. printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  22. regs->eax, regs->ebx, regs->ecx, regs->edx);
  23. printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  24. regs->esi, regs->edi, regs->ebp);
  25. printk(" DS: %04x ES: %04x\n",
  26. 0xffff & regs->xds, 0xffff & regs->xes);
  27. #endif
  28. show_trace(current, &regs->gpr[1]);
  29. }