2 * Tracing hooks, i386 CPU support
4 * Copyright (C) 2006, 2007 Red Hat, Inc. All rights reserved.
6 * This copyrighted material is made available to anyone wishing to use,
7 * modify, copy, or redistribute it subject to the terms and conditions
8 * of the GNU General Public License v.2.
10 * Red Hat Author: Roland McGrath.
13 #ifndef _ASM_TRACEHOOK_H
14 #define _ASM_TRACEHOOK_H 1
16 #include <linux/sched.h>
17 #include <asm/ptrace.h>
20 * See linux/tracehook.h for the descriptions of what these need to do.
23 #define ARCH_HAS_SINGLE_STEP (1)
25 /* These two are defined in arch/i386/kernel/ptrace.c. */
26 void tracehook_enable_single_step(struct task_struct *tsk);
27 void tracehook_disable_single_step(struct task_struct *tsk);
29 static inline int tracehook_single_step_enabled(struct task_struct *tsk)
31 return test_tsk_thread_flag(tsk, TIF_SINGLESTEP);
34 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
36 set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
39 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
41 clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
44 static inline void tracehook_abort_syscall(struct pt_regs *regs)
49 extern const struct utrace_regset_view utrace_i386_native;
50 static inline const struct utrace_regset_view *
51 utrace_native_view(struct task_struct *tsk)
53 return &utrace_i386_native;