2 * Copyright (C)2006 Intel Co
3 * Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
4 * and Bibo Mao <bibo.mao@intel.com> adapted from i386.
6 * Tracing hooks, ia64 CPU support
9 #ifndef _ASM_TRACEHOOK_H
10 #define _ASM_TRACEHOOK_H 1
12 #include <linux/sched.h>
13 #include <asm/ptrace.h>
16 * See linux/tracehook.h for the descriptions of what these need to do.
19 #define ARCH_HAS_SINGLE_STEP (1)
20 #define ARCH_HAS_BLOCK_STEP (1)
22 static inline void tracehook_enable_single_step(struct task_struct *tsk)
24 struct pt_regs *pt = task_pt_regs(tsk);
28 static inline void tracehook_disable_single_step(struct task_struct *tsk)
30 struct pt_regs *pt = task_pt_regs(tsk);
34 static inline void tracehook_enable_block_step(struct task_struct *tsk)
36 struct pt_regs *pt = task_pt_regs(tsk);
40 static inline void tracehook_disable_block_step(struct task_struct *tsk)
42 struct pt_regs *pt = task_pt_regs(tsk);
46 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
48 set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
51 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
53 clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
56 static inline int tracehook_single_step_enabled(struct task_struct *tsk)
58 struct pt_regs *pt = task_pt_regs(tsk);
59 return ia64_psr(pt)->ss;
62 static inline void tracehook_abort_syscall(struct pt_regs *regs)
67 extern const struct utrace_regset_view utrace_ia64_native;
68 static inline const struct utrace_regset_view *
69 utrace_native_view(struct task_struct *tsk)
71 #if 0 //CONFIG_IA32_SUPPORT
72 extern const struct utrace_regset_view utrace_ia32_view;
74 struct pt_regs *pt = task_pt_regs(tsk);
75 if (pt->cr_ipsr & IA64_PSR_IS)
76 return &utrace_ia32_view;
78 return &utrace_ia64_native;