Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / arch / um / include / sysdep-i386 / ptrace_user.h
blob8fb68edba2ca6a014e2c04dd6f778459db7b96cc
1 /*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #ifndef __SYSDEP_I386_PTRACE_USER_H__
7 #define __SYSDEP_I386_PTRACE_USER_H__
9 #include <sys/ptrace.h>
10 #include <linux/ptrace.h>
11 #include <asm/ptrace.h>
12 <<<<<<< HEAD:arch/um/include/sysdep-i386/ptrace_user.h
13 =======
14 #include "user_constants.h"
15 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/um/include/sysdep-i386/ptrace_user.h
17 #define PT_OFFSET(r) ((r) * sizeof(long))
19 #define PT_SYSCALL_NR(regs) ((regs)[ORIG_EAX])
20 #define PT_SYSCALL_NR_OFFSET PT_OFFSET(ORIG_EAX)
22 #define PT_SYSCALL_ARG1_OFFSET PT_OFFSET(EBX)
23 #define PT_SYSCALL_ARG2_OFFSET PT_OFFSET(ECX)
24 #define PT_SYSCALL_ARG3_OFFSET PT_OFFSET(EDX)
25 #define PT_SYSCALL_ARG4_OFFSET PT_OFFSET(ESI)
26 #define PT_SYSCALL_ARG5_OFFSET PT_OFFSET(EDI)
27 #define PT_SYSCALL_ARG6_OFFSET PT_OFFSET(EBP)
29 #define PT_SYSCALL_RET_OFFSET PT_OFFSET(EAX)
31 #define REGS_SYSCALL_NR EAX /* This is used before a system call */
32 #define REGS_SYSCALL_ARG1 EBX
33 #define REGS_SYSCALL_ARG2 ECX
34 #define REGS_SYSCALL_ARG3 EDX
35 #define REGS_SYSCALL_ARG4 ESI
36 #define REGS_SYSCALL_ARG5 EDI
37 #define REGS_SYSCALL_ARG6 EBP
39 #define REGS_IP_INDEX EIP
40 #define REGS_SP_INDEX UESP
42 #define PT_IP_OFFSET PT_OFFSET(EIP)
43 #define PT_IP(regs) ((regs)[EIP])
44 #define PT_SP_OFFSET PT_OFFSET(UESP)
45 #define PT_SP(regs) ((regs)[UESP])
47 <<<<<<< HEAD:arch/um/include/sysdep-i386/ptrace_user.h
48 =======
49 #define FP_SIZE ((HOST_XFP_SIZE > HOST_FP_SIZE) ? HOST_XFP_SIZE : HOST_FP_SIZE)
51 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/um/include/sysdep-i386/ptrace_user.h
52 #ifndef FRAME_SIZE
53 #define FRAME_SIZE (17)
54 #endif
55 #define FRAME_SIZE_OFFSET (FRAME_SIZE * sizeof(unsigned long))
57 #define FP_FRAME_SIZE (27)
58 #define FPX_FRAME_SIZE (128)
60 #ifdef PTRACE_GETREGS
61 #define UM_HAVE_GETREGS
62 #endif
64 #ifdef PTRACE_SETREGS
65 #define UM_HAVE_SETREGS
66 #endif
68 #ifdef PTRACE_GETFPREGS
69 #define UM_HAVE_GETFPREGS
70 #endif
72 #ifdef PTRACE_SETFPREGS
73 #define UM_HAVE_SETFPREGS
74 #endif
76 #ifdef PTRACE_GETFPXREGS
77 #define UM_HAVE_GETFPXREGS
78 #endif
80 #ifdef PTRACE_SETFPXREGS
81 #define UM_HAVE_SETFPXREGS
82 #endif
84 #endif