ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / um / include / sysdep-i386 / ptrace_user.h
1 /* 
2  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #ifndef __SYSDEP_I386_PTRACE_USER_H__
7 #define __SYSDEP_I386_PTRACE_USER_H__
8
9 #include <asm/ptrace.h>
10
11 #define PT_OFFSET(r) ((r) * sizeof(long))
12
13 #define PT_SYSCALL_NR(regs) ((regs)[ORIG_EAX])
14 #define PT_SYSCALL_NR_OFFSET PT_OFFSET(ORIG_EAX)
15
16 #define PT_SYSCALL_ARG1_OFFSET PT_OFFSET(EBX)
17 #define PT_SYSCALL_ARG2_OFFSET PT_OFFSET(ECX)
18 #define PT_SYSCALL_ARG3_OFFSET PT_OFFSET(EDX)
19 #define PT_SYSCALL_ARG4_OFFSET PT_OFFSET(ESI)
20 #define PT_SYSCALL_ARG5_OFFSET PT_OFFSET(EDI)
21
22 #define PT_SYSCALL_RET_OFFSET PT_OFFSET(EAX)
23
24 #define PT_IP_OFFSET PT_OFFSET(EIP)
25 #define PT_IP(regs) ((regs)[EIP])
26 #define PT_SP(regs) ((regs)[UESP])
27
28 #ifndef FRAME_SIZE
29 #define FRAME_SIZE (17)
30 #endif
31 #define FRAME_SIZE_OFFSET (FRAME_SIZE * sizeof(unsigned long))
32
33 #define FP_FRAME_SIZE (27)
34 #define FPX_FRAME_SIZE (128)
35
36 #ifdef PTRACE_GETREGS
37 #define UM_HAVE_GETREGS
38 #endif
39
40 #ifdef PTRACE_SETREGS
41 #define UM_HAVE_SETREGS
42 #endif
43
44 #ifdef PTRACE_GETFPREGS
45 #define UM_HAVE_GETFPREGS
46 #endif
47
48 #ifdef PTRACE_SETFPREGS
49 #define UM_HAVE_SETFPREGS
50 #endif
51
52 #ifdef PTRACE_GETFPXREGS
53 #define UM_HAVE_GETFPXREGS
54 #endif
55
56 #ifdef PTRACE_SETFPXREGS
57 #define UM_HAVE_SETFPXREGS
58 #endif
59
60 extern void update_debugregs(int seq);
61
62 #endif