diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-15 06:49:37 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-15 06:49:37 +0100 |
commit | 028c5d5d596651bce13d06737eb3707a7e99a30c (patch) | |
tree | e4e429858a19635ad2b5aa563bf1b4e39396d4e2 /arch/sh/kernel/ptrace_64.c | |
parent | sh64: fix up memory offset calculation. (diff) | |
parent | sh64: fix tracing of signals. (diff) | |
download | linux-028c5d5d596651bce13d06737eb3707a7e99a30c.tar.xz linux-028c5d5d596651bce13d06737eb3707a7e99a30c.zip |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'arch/sh/kernel/ptrace_64.c')
-rw-r--r-- | arch/sh/kernel/ptrace_64.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index 2f6140e95ec5..5fd644da7f02 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c @@ -132,6 +132,8 @@ void user_enable_single_step(struct task_struct *child) struct pt_regs *regs = child->thread.uregs; regs->sr |= SR_SSTEP; /* auto-resetting upon exception */ + + set_tsk_thread_flag(child, TIF_SINGLESTEP); } void user_disable_single_step(struct task_struct *child) @@ -139,6 +141,8 @@ void user_disable_single_step(struct task_struct *child) struct pt_regs *regs = child->thread.uregs; regs->sr &= ~SR_SSTEP; + + clear_tsk_thread_flag(child, TIF_SINGLESTEP); } static int genregs_get(struct task_struct *target, @@ -453,6 +457,8 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs) asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) { + int step; + if (unlikely(current->audit_context)) audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), regs->regs[9]); @@ -460,8 +466,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) trace_sys_exit(regs, regs->regs[9]); - if (test_thread_flag(TIF_SYSCALL_TRACE)) - tracehook_report_syscall_exit(regs, 0); + step = test_thread_flag(TIF_SINGLESTEP); + if (step || test_thread_flag(TIF_SYSCALL_TRACE)) + tracehook_report_syscall_exit(regs, step); } /* Called with interrupts disabled */ |