ptrace.h (0ff555192a8d20385d49d1c420e2e8d409b3c0da) ptrace.h (bf53de907dfdaac178c92d774aae7370d7b97d20)
1#ifndef _ASM_X86_PTRACE_H
2#define _ASM_X86_PTRACE_H
3
4#include <linux/compiler.h> /* For __user */
5#include <asm/ptrace-abi.h>
6#include <asm/processor-flags.h>
7
8#ifdef __KERNEL__
1#ifndef _ASM_X86_PTRACE_H
2#define _ASM_X86_PTRACE_H
3
4#include <linux/compiler.h> /* For __user */
5#include <asm/ptrace-abi.h>
6#include <asm/processor-flags.h>
7
8#ifdef __KERNEL__
9#include <asm/ds.h> /* the DS BTS struct is used for ptrace too */
10#include <asm/segment.h>
11#endif
12
13#ifndef __ASSEMBLY__
14
15#ifdef __i386__
16/* this struct defines the way the registers are stored on the
17 stack during a system call. */

--- 105 unchanged lines hidden (view full) ---

123 unsigned long ss;
124/* top of stack page */
125};
126
127#endif /* __KERNEL__ */
128#endif /* !__i386__ */
129
130
9#include <asm/segment.h>
10#endif
11
12#ifndef __ASSEMBLY__
13
14#ifdef __i386__
15/* this struct defines the way the registers are stored on the
16 stack during a system call. */

--- 105 unchanged lines hidden (view full) ---

122 unsigned long ss;
123/* top of stack page */
124};
125
126#endif /* __KERNEL__ */
127#endif /* !__i386__ */
128
129
131#ifdef CONFIG_X86_PTRACE_BTS
132/* a branch trace record entry
133 *
134 * In order to unify the interface between various processor versions,
135 * we use the below data structure for all processors.
136 */
137enum bts_qualifier {
138 BTS_INVALID = 0,
139 BTS_BRANCH,
140 BTS_TASK_ARRIVES,
141 BTS_TASK_DEPARTS
142};
143
144struct bts_struct {
145 __u64 qualifier;
146 union {
147 /* BTS_BRANCH */
148 struct {
149 __u64 from_ip;
150 __u64 to_ip;
151 } lbr;
152 /* BTS_TASK_ARRIVES or
153 BTS_TASK_DEPARTS */
154 __u64 jiffies;
155 } variant;
156};
157#endif /* CONFIG_X86_PTRACE_BTS */
158
159#ifdef __KERNEL__
160
161#include <linux/init.h>
162
163struct cpuinfo_x86;
164struct task_struct;
165
130#ifdef __KERNEL__
131
132#include <linux/init.h>
133
134struct cpuinfo_x86;
135struct task_struct;
136
166#ifdef CONFIG_X86_PTRACE_BTS
167extern void __cpuinit ptrace_bts_init_intel(struct cpuinfo_x86 *);
168extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier);
169#else
170#define ptrace_bts_init_intel(config) do {} while (0)
171#endif /* CONFIG_X86_PTRACE_BTS */
172
173extern unsigned long profile_pc(struct pt_regs *regs);
174
175extern unsigned long
176convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
177extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
178 int error_code, int si_code);
179void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
180

--- 85 unchanged lines hidden (view full) ---

266#endif
267
268struct user_desc;
269extern int do_get_thread_area(struct task_struct *p, int idx,
270 struct user_desc __user *info);
271extern int do_set_thread_area(struct task_struct *p, int idx,
272 struct user_desc __user *info, int can_allocate);
273
137extern unsigned long profile_pc(struct pt_regs *regs);
138
139extern unsigned long
140convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
141extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
142 int error_code, int si_code);
143void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
144

--- 85 unchanged lines hidden (view full) ---

230#endif
231
232struct user_desc;
233extern int do_get_thread_area(struct task_struct *p, int idx,
234 struct user_desc __user *info);
235extern int do_set_thread_area(struct task_struct *p, int idx,
236 struct user_desc __user *info, int can_allocate);
237
238extern void x86_ptrace_untrace(struct task_struct *);
239extern void x86_ptrace_fork(struct task_struct *child,
240 unsigned long clone_flags);
241
242#define arch_ptrace_untrace(tsk) x86_ptrace_untrace(tsk)
243#define arch_ptrace_fork(child, flags) x86_ptrace_fork(child, flags)
244
274#endif /* __KERNEL__ */
275
276#endif /* !__ASSEMBLY__ */
277
278#endif /* _ASM_X86_PTRACE_H */
245#endif /* __KERNEL__ */
246
247#endif /* !__ASSEMBLY__ */
248
249#endif /* _ASM_X86_PTRACE_H */