diff options
Diffstat (limited to 'arch/m68knommu/kernel')
-rw-r--r-- | arch/m68knommu/kernel/ptrace.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index a32e2de78295..6fe7c38cd556 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
19 | #include <linux/user.h> | 19 | #include <linux/user.h> |
20 | #include <linux/signal.h> | 20 | #include <linux/signal.h> |
21 | #include <linux/tracehook.h> | ||
21 | 22 | ||
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
@@ -241,21 +242,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
241 | return ret; | 242 | return ret; |
242 | } | 243 | } |
243 | 244 | ||
244 | asmlinkage void syscall_trace(void) | 245 | asmlinkage int syscall_trace_enter(void) |
245 | { | 246 | { |
246 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 247 | int ret = 0; |
247 | return; | 248 | |
248 | if (!(current->ptrace & PT_PTRACED)) | 249 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
249 | return; | 250 | ret = tracehook_report_syscall_entry(task_pt_regs(current)); |
250 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 251 | return ret; |
251 | ? 0x80 : 0)); | 252 | } |
252 | /* | 253 | |
253 | * this isn't the same as continuing with a signal, but it will do | 254 | asmlinkage void syscall_trace_leave(void) |
254 | * for normal use. strace only continues with a signal if the | 255 | { |
255 | * stopping signal is not SIGTRAP. -brl | 256 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
256 | */ | 257 | tracehook_report_syscall_exit(task_pt_regs(current), 0); |
257 | if (current->exit_code) { | ||
258 | send_sig(current->exit_code, current, 1); | ||
259 | current->exit_code = 0; | ||
260 | } | ||
261 | } | 258 | } |