diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-07-21 11:10:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 21:37:10 -0400 |
commit | bb1995d52b05f7e671914454d0ae57bd4170ef47 (patch) | |
tree | 3a4924f5d24e71f4884e6598085b557d856777e8 /arch/i386/kernel/process.c | |
parent | 44bf4cea43816d43deab73c1c16361e899996eaa (diff) |
x86: Make Alt-SysRq-p display the debug register contents
This patch (as921) adds code to the show_regs() routine in i386 and x86_64
to print the contents of the debug registers along with all the others.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/process.c')
-rw-r--r-- | arch/i386/kernel/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 6c49acb96982..84664710b784 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -300,6 +300,7 @@ early_param("idle", idle_setup); | |||
300 | void show_regs(struct pt_regs * regs) | 300 | void show_regs(struct pt_regs * regs) |
301 | { | 301 | { |
302 | unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; | 302 | unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; |
303 | unsigned long d0, d1, d2, d3, d6, d7; | ||
303 | 304 | ||
304 | printk("\n"); | 305 | printk("\n"); |
305 | printk("Pid: %d, comm: %20s\n", current->pid, current->comm); | 306 | printk("Pid: %d, comm: %20s\n", current->pid, current->comm); |
@@ -324,6 +325,17 @@ void show_regs(struct pt_regs * regs) | |||
324 | cr3 = read_cr3(); | 325 | cr3 = read_cr3(); |
325 | cr4 = read_cr4_safe(); | 326 | cr4 = read_cr4_safe(); |
326 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); | 327 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); |
328 | |||
329 | get_debugreg(d0, 0); | ||
330 | get_debugreg(d1, 1); | ||
331 | get_debugreg(d2, 2); | ||
332 | get_debugreg(d3, 3); | ||
333 | printk("DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n", | ||
334 | d0, d1, d2, d3); | ||
335 | get_debugreg(d6, 6); | ||
336 | get_debugreg(d7, 7); | ||
337 | printk("DR6: %08lx DR7: %08lx\n", d6, d7); | ||
338 | |||
327 | show_trace(NULL, regs, ®s->esp); | 339 | show_trace(NULL, regs, ®s->esp); |
328 | } | 340 | } |
329 | 341 | ||