summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/ptrace.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-08-17 10:22:04 +0400
committerRalf Baechle <ralf@linux-mips.org>2013-10-30 00:25:11 +0400
commitc0ff3c53d4f99f5e0ac5fc30ad77f26159b347e0 (patch)
treeace67e4403900863e8532068c9caa120aa726d0a /arch/mips/include/asm/ptrace.h
parent6a9c001b7ec3ae6639f97a5b7ea4b0ea35053b18 (diff)
downloadlinux-c0ff3c53d4f99f5e0ac5fc30ad77f26159b347e0.tar.xz
MIPS: Enable HAVE_ARCH_TRACEHOOK.
This enables /proc/<pid>/syscall and the ptrace PTRACE_GETREGSET and PTRACE_SETREGSET operations. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/ptrace.h')
-rw-r--r--arch/mips/include/asm/ptrace.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index 5e6cd0947393..7bba9da110af 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -81,7 +81,6 @@ static inline long regs_return_value(struct pt_regs *regs)
#define instruction_pointer(regs) ((regs)->cp0_epc)
#define profile_pc(regs) instruction_pointer(regs)
-#define user_stack_pointer(r) ((r)->regs[29])
extern asmlinkage void syscall_trace_enter(struct pt_regs *regs);
extern asmlinkage void syscall_trace_leave(struct pt_regs *regs);
@@ -100,4 +99,17 @@ static inline void die_if_kernel(const char *str, struct pt_regs *regs)
(struct pt_regs *)((sp | (THREAD_SIZE - 1)) + 1 - 32) - 1; \
})
+/* Helpers for working with the user stack pointer */
+
+static inline unsigned long user_stack_pointer(struct pt_regs *regs)
+{
+ return regs->regs[29];
+}
+
+static inline void user_stack_pointer_set(struct pt_regs *regs,
+ unsigned long val)
+{
+ regs->regs[29] = val;
+}
+
#endif /* _ASM_PTRACE_H */