aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/process.c12
-rw-r--r--arch/x86_64/kernel/process.c10
2 files changed, 22 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);
300void show_regs(struct pt_regs * regs) 300void 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, &regs->esp); 339 show_trace(NULL, regs, &regs->esp);
328} 340}
329 341
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index 180f4c0fcbc4..bbfc957f045f 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -306,6 +306,7 @@ early_param("idle", idle_setup);
306void __show_regs(struct pt_regs * regs) 306void __show_regs(struct pt_regs * regs)
307{ 307{
308 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs; 308 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs;
309 unsigned long d0, d1, d2, d3, d6, d7;
309 unsigned int fsindex,gsindex; 310 unsigned int fsindex,gsindex;
310 unsigned int ds,cs,es; 311 unsigned int ds,cs,es;
311 312
@@ -350,6 +351,15 @@ void __show_regs(struct pt_regs * regs)
350 fs,fsindex,gs,gsindex,shadowgs); 351 fs,fsindex,gs,gsindex,shadowgs);
351 printk("CS: %04x DS: %04x ES: %04x CR0: %016lx\n", cs, ds, es, cr0); 352 printk("CS: %04x DS: %04x ES: %04x CR0: %016lx\n", cs, ds, es, cr0);
352 printk("CR2: %016lx CR3: %016lx CR4: %016lx\n", cr2, cr3, cr4); 353 printk("CR2: %016lx CR3: %016lx CR4: %016lx\n", cr2, cr3, cr4);
354
355 get_debugreg(d0, 0);
356 get_debugreg(d1, 1);
357 get_debugreg(d2, 2);
358 printk("DR0: %016lx DR1: %016lx DR2: %016lx\n", d0, d1, d2);
359 get_debugreg(d3, 3);
360 get_debugreg(d6, 6);
361 get_debugreg(d7, 7);
362 printk("DR3: %016lx DR6: %016lx DR7: %016lx\n", d3, d6, d7);
353} 363}
354 364
355void show_regs(struct pt_regs *regs) 365void show_regs(struct pt_regs *regs)