aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/include/asm/ptrace.h1
-rw-r--r--arch/h8300/include/asm/ptrace.h1
-rw-r--r--include/linux/ptrace.h9
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h
index b87755a19554..b4c5b2fbb647 100644
--- a/arch/alpha/include/asm/ptrace.h
+++ b/arch/alpha/include/asm/ptrace.h
@@ -78,6 +78,7 @@ struct switch_stack {
78 78
79#define current_pt_regs() \ 79#define current_pt_regs() \
80 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1) 80 ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1)
81#define signal_pt_regs current_pt_regs
81 82
82#define force_successful_syscall_return() (current_pt_regs()->r0 = 0) 83#define force_successful_syscall_return() (current_pt_regs()->r0 = 0)
83 84
diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h
index 00502a61bf0a..7468589a128b 100644
--- a/arch/h8300/include/asm/ptrace.h
+++ b/arch/h8300/include/asm/ptrace.h
@@ -62,6 +62,7 @@ struct pt_regs {
62#define profile_pc(regs) instruction_pointer(regs) 62#define profile_pc(regs) instruction_pointer(regs)
63#define current_pt_regs() ((struct pt_regs *) \ 63#define current_pt_regs() ((struct pt_regs *) \
64 (THREAD_SIZE + (unsigned long)current_thread_info()) - 1) 64 (THREAD_SIZE + (unsigned long)current_thread_info()) - 1)
65#define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
65#endif /* __KERNEL__ */ 66#endif /* __KERNEL__ */
66#endif /* __ASSEMBLY__ */ 67#endif /* __ASSEMBLY__ */
67#endif /* _H8300_PTRACE_H */ 68#endif /* _H8300_PTRACE_H */
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 7aefbae2452e..b8e6dcec78ae 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -333,6 +333,15 @@ static inline void user_single_step_siginfo(struct task_struct *tsk,
333#define ptrace_signal_deliver(regs, cookie) do { } while (0) 333#define ptrace_signal_deliver(regs, cookie) do { } while (0)
334#endif 334#endif
335 335
336/*
337 * unlike current_pt_regs(), this one is equal to task_pt_regs(current)
338 * on *all* architectures; the only reason to have a per-arch definition
339 * is optimisation.
340 */
341#ifndef signal_pt_regs
342#define signal_pt_regs() task_pt_regs(current)
343#endif
344
336extern int task_current_syscall(struct task_struct *target, long *callno, 345extern int task_current_syscall(struct task_struct *target, long *callno,
337 unsigned long args[6], unsigned int maxargs, 346 unsigned long args[6], unsigned int maxargs,
338 unsigned long *sp, unsigned long *pc); 347 unsigned long *sp, unsigned long *pc);