aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r--arch/blackfin/kernel/ptrace.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 0618b8287e34..43eb969405d1 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -220,12 +220,16 @@ void user_enable_single_step(struct task_struct *child)
220{ 220{
221 struct pt_regs *regs = task_pt_regs(child); 221 struct pt_regs *regs = task_pt_regs(child);
222 regs->syscfg |= SYSCFG_SSSTEP; 222 regs->syscfg |= SYSCFG_SSSTEP;
223
224 set_tsk_thread_flag(child, TIF_SINGLESTEP);
223} 225}
224 226
225void user_disable_single_step(struct task_struct *child) 227void user_disable_single_step(struct task_struct *child)
226{ 228{
227 struct pt_regs *regs = task_pt_regs(child); 229 struct pt_regs *regs = task_pt_regs(child);
228 regs->syscfg &= ~SYSCFG_SSSTEP; 230 regs->syscfg &= ~SYSCFG_SSSTEP;
231
232 clear_tsk_thread_flag(child, TIF_SINGLESTEP);
229} 233}
230 234
231long arch_ptrace(struct task_struct *child, long request, long addr, long data) 235long arch_ptrace(struct task_struct *child, long request, long addr, long data)
@@ -401,6 +405,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
401 405
402asmlinkage void syscall_trace_leave(struct pt_regs *regs) 406asmlinkage void syscall_trace_leave(struct pt_regs *regs)
403{ 407{
404 if (test_thread_flag(TIF_SYSCALL_TRACE)) 408 int step;
405 tracehook_report_syscall_exit(regs, 0); 409
410 step = test_thread_flag(TIF_SINGLESTEP);
411 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
412 tracehook_report_syscall_exit(regs, step);
406} 413}