7 #include <asm/ptrace.h>
9 #define DEFINE(sym, val) \
10 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
12 #define DEFINE_LONGS(sym, val) \
13 asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long)))
15 #define OFFSET(sym, str, mem) \
16 DEFINE(sym, offsetof(struct str, mem));
20 OFFSET(HOST_SC_TRAPNO
, sigcontext
, trapno
);
21 OFFSET(HOST_SC_ERR
, sigcontext
, err
);
22 OFFSET(HOST_SC_CR2
, sigcontext
, cr2
);
24 DEFINE_LONGS(HOST_FP_SIZE
, sizeof(struct user_fpregs_struct
));
25 DEFINE_LONGS(HOST_XFP_SIZE
, sizeof(struct user_fpxregs_struct
));
28 DEFINE(HOST_SP
, UESP
);
29 DEFINE(HOST_EFLAGS
, EFL
);
30 DEFINE(HOST_EAX
, EAX
);
31 DEFINE(HOST_EBX
, EBX
);
32 DEFINE(HOST_ECX
, ECX
);
33 DEFINE(HOST_EDX
, EDX
);
34 DEFINE(HOST_ESI
, ESI
);
35 DEFINE(HOST_EDI
, EDI
);
36 DEFINE(HOST_EBP
, EBP
);
43 DEFINE(UM_FRAME_SIZE
, sizeof(struct user_regs_struct
));
45 /* XXX Duplicated between i386 and x86_64 */
46 DEFINE(UM_POLLIN
, POLLIN
);
47 DEFINE(UM_POLLPRI
, POLLPRI
);
48 DEFINE(UM_POLLOUT
, POLLOUT
);
50 DEFINE(UM_PROT_READ
, PROT_READ
);
51 DEFINE(UM_PROT_WRITE
, PROT_WRITE
);
52 DEFINE(UM_PROT_EXEC
, PROT_EXEC
);