1f08c3bdfSopenharmony_ci/*
2f08c3bdfSopenharmony_ci * ptrace is a fickle beast and each arch sucks in a different way
3f08c3bdfSopenharmony_ci */
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ci#ifndef __LTP_PTRACE_H__
6f08c3bdfSopenharmony_ci#define __LTP_PTRACE_H__
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ci#ifdef HAVE_SYS_PTRACE_H
9f08c3bdfSopenharmony_ci# include <sys/ptrace.h>
10f08c3bdfSopenharmony_ci#endif
11f08c3bdfSopenharmony_ci#ifdef HAVE_SYS_REG_H
12f08c3bdfSopenharmony_ci# include <sys/reg.h>
13f08c3bdfSopenharmony_ci#endif
14f08c3bdfSopenharmony_ci#ifdef __ia64__ /* what a pos */
15f08c3bdfSopenharmony_ci# define ia64_fpreg FU_ia64_fpreg
16f08c3bdfSopenharmony_ci# define pt_all_user_regs FU_pt_all_user_regs
17f08c3bdfSopenharmony_ci#endif
18f08c3bdfSopenharmony_ci#ifdef HAVE_ASM_PTRACE_H
19f08c3bdfSopenharmony_ci# include <asm/ptrace.h>
20f08c3bdfSopenharmony_ci#endif
21f08c3bdfSopenharmony_ci#ifdef HAVE_LINUX_PTRACE_H
22f08c3bdfSopenharmony_ci# ifndef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS
23f08c3bdfSopenharmony_ci#  include <linux/ptrace.h>
24f08c3bdfSopenharmony_ci# endif
25f08c3bdfSopenharmony_ci#endif
26f08c3bdfSopenharmony_ci#undef FU_ia64_fpreg
27f08c3bdfSopenharmony_ci#undef FU_pt_all_user_regs
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci#if defined(HAVE_STRUCT_PT_REGS)
30f08c3bdfSopenharmony_citypedef struct pt_regs ptrace_regs;
31f08c3bdfSopenharmony_ci#elif defined(HAVE_STRUCT_USER_REGS_STRUCT)
32f08c3bdfSopenharmony_citypedef struct user_regs_struct ptrace_regs;
33f08c3bdfSopenharmony_ci#endif
34f08c3bdfSopenharmony_ci
35f08c3bdfSopenharmony_ci#endif
36