diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/um/include/ptrace_user.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/um/include/ptrace_user.h')
-rw-r--r-- | arch/um/include/ptrace_user.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/arch/um/include/ptrace_user.h b/arch/um/include/ptrace_user.h new file mode 100644 index 000000000000..f3450e6bc18d --- /dev/null +++ b/arch/um/include/ptrace_user.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __PTRACE_USER_H__ | ||
7 | #define __PTRACE_USER_H__ | ||
8 | |||
9 | #include "sysdep/ptrace_user.h" | ||
10 | |||
11 | extern int ptrace_getregs(long pid, unsigned long *regs_out); | ||
12 | extern int ptrace_setregs(long pid, unsigned long *regs_in); | ||
13 | extern int ptrace_getfpregs(long pid, unsigned long *regs_out); | ||
14 | extern int ptrace_setfpregs(long pid, unsigned long *regs); | ||
15 | extern void arch_enter_kernel(void *task, int pid); | ||
16 | extern void arch_leave_kernel(void *task, int pid); | ||
17 | extern void ptrace_pokeuser(unsigned long addr, unsigned long data); | ||
18 | |||
19 | |||
20 | /* syscall emulation path in ptrace */ | ||
21 | |||
22 | #ifndef PTRACE_SYSEMU | ||
23 | #define PTRACE_SYSEMU 31 | ||
24 | #endif | ||
25 | #ifndef PTRACE_SYSEMU_SINGLESTEP | ||
26 | #define PTRACE_SYSEMU_SINGLESTEP 32 | ||
27 | #endif | ||
28 | |||
29 | /* On architectures, that started to support PTRACE_O_TRACESYSGOOD | ||
30 | * in linux 2.4, there are two different definitions of | ||
31 | * PTRACE_SETOPTIONS: linux 2.4 uses 21 while linux 2.6 uses 0x4200. | ||
32 | * For binary compatibility, 2.6 also supports the old "21", named | ||
33 | * PTRACE_OLDSETOPTION. On these architectures, UML always must use | ||
34 | * "21", to ensure the kernel runs on 2.4 and 2.6 host without | ||
35 | * recompilation. So, we use PTRACE_OLDSETOPTIONS in UML. | ||
36 | * We also want to be able to build the kernel on 2.4, which doesn't | ||
37 | * have PTRACE_OLDSETOPTIONS. So, if it is missing, we declare | ||
38 | * PTRACE_OLDSETOPTIONS to to be the same as PTRACE_SETOPTIONS. | ||
39 | * | ||
40 | * On architectures, that start to support PTRACE_O_TRACESYSGOOD on | ||
41 | * linux 2.6, PTRACE_OLDSETOPTIONS never is defined, and also isn't | ||
42 | * supported by the host kernel. In that case, our trick lets us use | ||
43 | * the new 0x4200 with the name PTRACE_OLDSETOPTIONS. | ||
44 | */ | ||
45 | #ifndef PTRACE_OLDSETOPTIONS | ||
46 | #define PTRACE_OLDSETOPTIONS PTRACE_SETOPTIONS | ||
47 | #endif | ||
48 | |||
49 | void set_using_sysemu(int value); | ||
50 | int get_using_sysemu(void); | ||
51 | extern int sysemu_supported; | ||
52 | |||
53 | #define SELECT_PTRACE_OPERATION(sysemu_mode, singlestep_mode) \ | ||
54 | (((int[3][3] ) { \ | ||
55 | { PTRACE_SYSCALL, PTRACE_SYSCALL, PTRACE_SINGLESTEP }, \ | ||
56 | { PTRACE_SYSEMU, PTRACE_SYSEMU, PTRACE_SINGLESTEP }, \ | ||
57 | { PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP, PTRACE_SYSEMU_SINGLESTEP }}) \ | ||
58 | [sysemu_mode][singlestep_mode]) | ||
59 | |||
60 | #endif | ||