1 #ifndef _LINUX_PTRACE_H
2 #define _LINUX_PTRACE_H
3 /* ptrace.h */
4 /* structs and defines to help the user use the ptrace system call. */
5 
6 /* has the defines to get at the registers. */
7 
8 #define PTRACE_TRACEME		   0
9 #define PTRACE_PEEKTEXT		   1
10 #define PTRACE_PEEKDATA		   2
11 #define PTRACE_PEEKUSR		   3
12 #define PTRACE_POKETEXT		   4
13 #define PTRACE_POKEDATA		   5
14 #define PTRACE_POKEUSR		   6
15 #define PTRACE_CONT		   7
16 #define PTRACE_KILL		   8
17 #define PTRACE_SINGLESTEP	   9
18 
19 #define PTRACE_ATTACH		0x10
20 #define PTRACE_DETACH		0x11
21 
22 #define PTRACE_SYSCALL		  24
23 
24 #include <asm/ptrace.h>
25 
26 #ifdef __KERNEL__
27 
28 #ifndef force_successful_syscall_return
29 /*
30  * System call handlers that, upon successful completion, need to return a
31  * negative value should call force_successful_syscall_return() right before
32  * returning.  On architectures where the syscall convention provides for a
33  * separate error flag (e.g., alpha, ia64, ppc{,64}, sparc{,64}, possibly
34  * others), this macro can be used to ensure that the error flag will not get
35  * set.  On architectures which do not support a separate error flag, the macro
36  * is a no-op and the spurious error condition needs to be filtered out by some
37  * other means (e.g., in user-level, by passing an extra argument to the
38  * syscall handler, or something along those lines).
39  */
40 #define force_successful_syscall_return() do { } while (0)
41 #endif
42 #endif
43 
44 #endif
45