aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/ptrace.c')
-rw-r--r--arch/parisc/kernel/ptrace.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 08f6d2cbf0e0..c4f49e45129d 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -36,7 +36,8 @@
36 */ 36 */
37void ptrace_disable(struct task_struct *task) 37void ptrace_disable(struct task_struct *task)
38{ 38{
39 task->ptrace &= ~(PT_SINGLESTEP|PT_BLOCKSTEP); 39 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
40 clear_tsk_thread_flag(task, TIF_BLOCKSTEP);
40 41
41 /* make sure the trap bits are not set */ 42 /* make sure the trap bits are not set */
42 pa_psw(task)->r = 0; 43 pa_psw(task)->r = 0;
@@ -56,8 +57,8 @@ void user_disable_single_step(struct task_struct *task)
56 57
57void user_enable_single_step(struct task_struct *task) 58void user_enable_single_step(struct task_struct *task)
58{ 59{
59 task->ptrace &= ~PT_BLOCKSTEP; 60 clear_tsk_thread_flag(task, TIF_BLOCKSTEP);
60 task->ptrace |= PT_SINGLESTEP; 61 set_tsk_thread_flag(task, TIF_SINGLESTEP);
61 62
62 if (pa_psw(task)->n) { 63 if (pa_psw(task)->n) {
63 struct siginfo si; 64 struct siginfo si;
@@ -99,8 +100,8 @@ void user_enable_single_step(struct task_struct *task)
99 100
100void user_enable_block_step(struct task_struct *task) 101void user_enable_block_step(struct task_struct *task)
101{ 102{
102 task->ptrace &= ~PT_SINGLESTEP; 103 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
103 task->ptrace |= PT_BLOCKSTEP; 104 set_tsk_thread_flag(task, TIF_BLOCKSTEP);
104 105
105 /* Enable taken branch trap. */ 106 /* Enable taken branch trap. */
106 pa_psw(task)->r = 0; 107 pa_psw(task)->r = 0;
@@ -275,7 +276,8 @@ long do_syscall_trace_enter(struct pt_regs *regs)
275 276
276void do_syscall_trace_exit(struct pt_regs *regs) 277void do_syscall_trace_exit(struct pt_regs *regs)
277{ 278{
278 int stepping = !!(current->ptrace & (PT_SINGLESTEP|PT_BLOCKSTEP)); 279 int stepping = test_thread_flag(TIF_SINGLESTEP) ||
280 test_thread_flag(TIF_BLOCKSTEP);
279 281
280 if (stepping || test_thread_flag(TIF_SYSCALL_TRACE)) 282 if (stepping || test_thread_flag(TIF_SYSCALL_TRACE))
281 tracehook_report_syscall_exit(regs, stepping); 283 tracehook_report_syscall_exit(regs, stepping);