|
@@ -702,7 +702,7 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)
|
|
} else if (n == 6) {
|
|
} else if (n == 6) {
|
|
val = thread->debugreg6;
|
|
val = thread->debugreg6;
|
|
} else if (n == 7) {
|
|
} else if (n == 7) {
|
|
- val = ptrace_get_dr7(thread->ptrace_bps);
|
|
|
|
|
|
+ val = thread->ptrace_dr7;
|
|
}
|
|
}
|
|
return val;
|
|
return val;
|
|
}
|
|
}
|
|
@@ -778,8 +778,11 @@ int ptrace_set_debugreg(struct task_struct *tsk, int n, unsigned long val)
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
/* All that's left is DR7 */
|
|
/* All that's left is DR7 */
|
|
- if (n == 7)
|
|
|
|
|
|
+ if (n == 7) {
|
|
rc = ptrace_write_dr7(tsk, val);
|
|
rc = ptrace_write_dr7(tsk, val);
|
|
|
|
+ if (!rc)
|
|
|
|
+ thread->ptrace_dr7 = val;
|
|
|
|
+ }
|
|
|
|
|
|
ret_path:
|
|
ret_path:
|
|
return rc;
|
|
return rc;
|