1 #ifndef _ASM_X86_PTRACE_ABI_H
2 #define _ASM_X86_PTRACE_ABI_H
27 #if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
34 /* arguments: interrupts/non tracing syscalls only save upto here*/
44 #define ORIG_RAX 120 /* = ERROR */
45 /* end of arguments */
46 /* cpu exception frame or undefined in case of fast syscall. */
53 #endif /* __ASSEMBLY__ */
55 /* top of stack page */
56 #define FRAME_SIZE 168
58 #endif /* !__i386__ */
60 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
61 #define PTRACE_GETREGS 12
62 #define PTRACE_SETREGS 13
63 #define PTRACE_GETFPREGS 14
64 #define PTRACE_SETFPREGS 15
65 #define PTRACE_GETFPXREGS 18
66 #define PTRACE_SETFPXREGS 19
68 #define PTRACE_OLDSETOPTIONS 21
70 /* only useful for access 32bit programs / kernels */
71 #define PTRACE_GET_THREAD_AREA 25
72 #define PTRACE_SET_THREAD_AREA 26
75 # define PTRACE_ARCH_PRCTL 30
77 # define PTRACE_SYSEMU 31
78 # define PTRACE_SYSEMU_SINGLESTEP 32
81 #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */
83 /* Return maximal BTS buffer size in number of records,
84 if successuf; -1, otherwise.
85 EOPNOTSUPP...processor does not support bts tracing */
86 #define PTRACE_BTS_MAX_BUFFER_SIZE 40
88 /* Allocate new bts buffer (free old one, if exists) of size DATA bts records;
89 parameter ADDR is ignored.
90 Return 0, if successful; -1, otherwise.
91 EOPNOTSUPP...processor does not support bts tracing
92 EINVAL.......invalid size in records
93 ENOMEM.......out of memory */
94 #define PTRACE_BTS_ALLOCATE_BUFFER 41
96 /* Return the size of the bts buffer in number of bts records,
97 if successful; -1, otherwise.
98 EOPNOTSUPP...processor does not support bts tracing
99 ENXIO........no buffer allocated */
100 #define PTRACE_BTS_GET_BUFFER_SIZE 42
102 /* Return the index of the next bts record to be written,
103 if successful; -1, otherwise.
104 EOPNOTSUPP...processor does not support bts tracing
105 ENXIO........no buffer allocated
106 After the first warp-around, this is the start of the circular bts buffer. */
107 #define PTRACE_BTS_GET_INDEX 43
109 /* Read the DATA'th bts record into a ptrace_bts_record buffer provided in ADDR.
110 Return 0, if successful; -1, otherwise
111 EOPNOTSUPP...processor does not support bts tracing
112 ENXIO........no buffer allocated
113 EINVAL.......invalid index */
114 #define PTRACE_BTS_READ_RECORD 44
116 /* Configure last branch trace; the configuration is given as a bit-mask of
117 PTRACE_BTS_O_* options in DATA; parameter ADDR is ignored.
118 Return 0, if successful; -1, otherwise
119 EOPNOTSUPP...processor does not support bts tracing
120 ENXIO........no buffer allocated */
121 #define PTRACE_BTS_CONFIG 45
123 /* Return the configuration as bit-mask of PTRACE_BTS_O_* options
124 if successful; -1, otherwise.
125 EOPNOTSUPP...processor does not support bts tracing
126 ENXIO........no buffer allocated */
127 #define PTRACE_BTS_STATUS 46
129 /* Trace configuration options */
130 /* Collect last branch trace */
131 #define PTRACE_BTS_O_TRACE_TASK 0x1
132 /* Take timestamps when the task arrives and departs */
133 #define PTRACE_BTS_O_TIMESTAMPS 0x2