diff options
Diffstat (limited to 'arch/sparc/kernel/ptrace.c')
| -rw-r--r-- | arch/sparc/kernel/ptrace.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 81f3b929743f..20699c701412 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/signal.h> | 21 | #include <linux/signal.h> |
| 22 | #include <linux/regset.h> | 22 | #include <linux/regset.h> |
| 23 | #include <linux/elf.h> | 23 | #include <linux/elf.h> |
| 24 | #include <linux/tracehook.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
| 26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
| @@ -450,21 +451,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
| 450 | return ret; | 451 | return ret; |
| 451 | } | 452 | } |
| 452 | 453 | ||
| 453 | asmlinkage void syscall_trace(void) | 454 | asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p) |
| 454 | { | 455 | { |
| 455 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 456 | int ret = 0; |
| 456 | return; | 457 | |
| 457 | if (!(current->ptrace & PT_PTRACED)) | 458 | if (test_thread_flag(TIF_SYSCALL_TRACE)) { |
| 458 | return; | 459 | if (syscall_exit_p) |
| 459 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 460 | tracehook_report_syscall_exit(regs, 0); |
| 460 | ? 0x80 : 0)); | 461 | else |
| 461 | /* | 462 | ret = tracehook_report_syscall_entry(regs); |
| 462 | * this isn't the same as continuing with a signal, but it will do | ||
| 463 | * for normal use. strace only continues with a signal if the | ||
| 464 | * stopping signal is not SIGTRAP. -brl | ||
| 465 | */ | ||
| 466 | if (current->exit_code) { | ||
| 467 | send_sig (current->exit_code, current, 1); | ||
| 468 | current->exit_code = 0; | ||
| 469 | } | 463 | } |
| 464 | |||
| 465 | return ret; | ||
| 470 | } | 466 | } |
