diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-05-12 17:01:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-13 11:02:21 -0400 |
commit | 47906dd9e63ba1a8cb188e9e786c5928674fbbd3 (patch) | |
tree | 34db787b1b1de132e374cbce25994ac652ccf57e /arch/um/include | |
parent | 46d7b522ebf486edbd096965d534cc6465e9e309 (diff) |
uml: tidy ptrace interface
Tidy the ptrace interface code. Removed a bunch of unused macros.
Started converting register sets from arrays of longs to structures.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/sysdep-i386/ptrace_user.h | 30 | ||||
-rw-r--r-- | arch/um/include/sysdep-x86_64/ptrace_user.h | 17 |
2 files changed, 5 insertions, 42 deletions
diff --git a/arch/um/include/sysdep-i386/ptrace_user.h b/arch/um/include/sysdep-i386/ptrace_user.h index 75650723c38f..ef56247e4143 100644 --- a/arch/um/include/sysdep-i386/ptrace_user.h +++ b/arch/um/include/sysdep-i386/ptrace_user.h | |||
@@ -41,38 +41,10 @@ | |||
41 | #define PT_SP_OFFSET PT_OFFSET(UESP) | 41 | #define PT_SP_OFFSET PT_OFFSET(UESP) |
42 | #define PT_SP(regs) ((regs)[UESP]) | 42 | #define PT_SP(regs) ((regs)[UESP]) |
43 | 43 | ||
44 | #define FP_SIZE ((HOST_XFP_SIZE > HOST_FP_SIZE) ? HOST_XFP_SIZE : HOST_FP_SIZE) | 44 | #define FP_SIZE ((HOST_FPX_SIZE > HOST_FP_SIZE) ? HOST_FPX_SIZE : HOST_FP_SIZE) |
45 | 45 | ||
46 | #ifndef FRAME_SIZE | 46 | #ifndef FRAME_SIZE |
47 | #define FRAME_SIZE (17) | 47 | #define FRAME_SIZE (17) |
48 | #endif | 48 | #endif |
49 | #define FRAME_SIZE_OFFSET (FRAME_SIZE * sizeof(unsigned long)) | ||
50 | |||
51 | #define FP_FRAME_SIZE (27) | ||
52 | #define FPX_FRAME_SIZE (128) | ||
53 | |||
54 | #ifdef PTRACE_GETREGS | ||
55 | #define UM_HAVE_GETREGS | ||
56 | #endif | ||
57 | |||
58 | #ifdef PTRACE_SETREGS | ||
59 | #define UM_HAVE_SETREGS | ||
60 | #endif | ||
61 | |||
62 | #ifdef PTRACE_GETFPREGS | ||
63 | #define UM_HAVE_GETFPREGS | ||
64 | #endif | ||
65 | |||
66 | #ifdef PTRACE_SETFPREGS | ||
67 | #define UM_HAVE_SETFPREGS | ||
68 | #endif | ||
69 | |||
70 | #ifdef PTRACE_GETFPXREGS | ||
71 | #define UM_HAVE_GETFPXREGS | ||
72 | #endif | ||
73 | |||
74 | #ifdef PTRACE_SETFPXREGS | ||
75 | #define UM_HAVE_SETFPXREGS | ||
76 | #endif | ||
77 | 49 | ||
78 | #endif | 50 | #endif |
diff --git a/arch/um/include/sysdep-x86_64/ptrace_user.h b/arch/um/include/sysdep-x86_64/ptrace_user.h index 45c0bd881cb3..4dbccdb58f48 100644 --- a/arch/um/include/sysdep-x86_64/ptrace_user.h +++ b/arch/um/include/sysdep-x86_64/ptrace_user.h | |||
@@ -48,7 +48,8 @@ | |||
48 | #define PT_ORIG_RAX_OFFSET (ORIG_RAX) | 48 | #define PT_ORIG_RAX_OFFSET (ORIG_RAX) |
49 | #define PT_ORIG_RAX(regs) ((regs)[PT_INDEX(ORIG_RAX)]) | 49 | #define PT_ORIG_RAX(regs) ((regs)[PT_INDEX(ORIG_RAX)]) |
50 | 50 | ||
51 | /* x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though | 51 | /* |
52 | * x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though | ||
52 | * it's defined in the kernel's include/linux/ptrace.h. Additionally, use the | 53 | * it's defined in the kernel's include/linux/ptrace.h. Additionally, use the |
53 | * 2.4 name and value for 2.4 host compatibility. | 54 | * 2.4 name and value for 2.4 host compatibility. |
54 | */ | 55 | */ |
@@ -56,7 +57,8 @@ | |||
56 | #define PTRACE_OLDSETOPTIONS 21 | 57 | #define PTRACE_OLDSETOPTIONS 21 |
57 | #endif | 58 | #endif |
58 | 59 | ||
59 | /* These are before the system call, so the system call number is RAX | 60 | /* |
61 | * These are before the system call, so the system call number is RAX | ||
60 | * rather than ORIG_RAX, and arg4 is R10 rather than RCX | 62 | * rather than ORIG_RAX, and arg4 is R10 rather than RCX |
61 | */ | 63 | */ |
62 | #define REGS_SYSCALL_NR PT_INDEX(RAX) | 64 | #define REGS_SYSCALL_NR PT_INDEX(RAX) |
@@ -73,14 +75,3 @@ | |||
73 | #define FP_SIZE (HOST_FP_SIZE) | 75 | #define FP_SIZE (HOST_FP_SIZE) |
74 | 76 | ||
75 | #endif | 77 | #endif |
76 | |||
77 | /* | ||
78 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
79 | * Emacs will notice this stuff at the end of the file and automatically | ||
80 | * adjust the settings for this buffer only. This must remain at the end | ||
81 | * of the file. | ||
82 | * --------------------------------------------------------------------------- | ||
83 | * Local variables: | ||
84 | * c-file-style: "linux" | ||
85 | * End: | ||
86 | */ | ||