aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r--arch/x86/kernel/ptrace.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 09ecbde91c13..313be40be55a 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -471,10 +471,10 @@ static int genregs_set(struct task_struct *target,
471static unsigned long ptrace_get_debugreg(struct task_struct *child, int n) 471static unsigned long ptrace_get_debugreg(struct task_struct *child, int n)
472{ 472{
473 switch (n) { 473 switch (n) {
474 case 0: return child->thread.debugreg0; 474 case 0: return child->thread.debugreg[0];
475 case 1: return child->thread.debugreg1; 475 case 1: return child->thread.debugreg[1];
476 case 2: return child->thread.debugreg2; 476 case 2: return child->thread.debugreg[2];
477 case 3: return child->thread.debugreg3; 477 case 3: return child->thread.debugreg[3];
478 case 6: return child->thread.debugreg6; 478 case 6: return child->thread.debugreg6;
479 case 7: return child->thread.debugreg7; 479 case 7: return child->thread.debugreg7;
480 } 480 }
@@ -493,10 +493,10 @@ static int ptrace_set_debugreg(struct task_struct *child,
493 return -EIO; 493 return -EIO;
494 494
495 switch (n) { 495 switch (n) {
496 case 0: child->thread.debugreg0 = data; break; 496 case 0: child->thread.debugreg[0] = data; break;
497 case 1: child->thread.debugreg1 = data; break; 497 case 1: child->thread.debugreg[1] = data; break;
498 case 2: child->thread.debugreg2 = data; break; 498 case 2: child->thread.debugreg[2] = data; break;
499 case 3: child->thread.debugreg3 = data; break; 499 case 3: child->thread.debugreg[3] = data; break;
500 500
501 case 6: 501 case 6:
502 if ((data & ~0xffffffffUL) != 0) 502 if ((data & ~0xffffffffUL) != 0)