2 * Tracing hooks, x86-64 CPU support
5 #ifndef _ASM_TRACEHOOK_H
6 #define _ASM_TRACEHOOK_H 1
8 #include <linux/sched.h>
9 #include <asm/ptrace.h>
10 #include <asm/proto.h>
13 * See linux/tracehook.h for the descriptions of what these need to do.
16 #define ARCH_HAS_SINGLE_STEP (1)
18 /* These two are defined in arch/x86_64/kernel/ptrace.c. */
19 void tracehook_enable_single_step(struct task_struct *tsk);
20 void tracehook_disable_single_step(struct task_struct *tsk);
22 static inline int tracehook_single_step_enabled(struct task_struct *tsk)
24 return test_tsk_thread_flag(tsk, TIF_SINGLESTEP);
27 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
29 set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
32 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
34 clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
37 static inline void tracehook_abort_syscall(struct pt_regs *regs)
42 extern const struct utrace_regset_view utrace_x86_64_native, utrace_ia32_view;
43 static inline const struct utrace_regset_view *
44 utrace_native_view(struct task_struct *tsk)
46 #ifdef CONFIG_IA32_EMULATION
47 if (test_tsk_thread_flag(tsk, TIF_IA32))
48 return &utrace_ia32_view;
50 return &utrace_x86_64_native;