diff options
author | Dave Airlie <airlied@redhat.com> | 2010-03-31 00:55:14 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-03-31 00:55:14 -0400 |
commit | 3595be778d8cb887f0e0575ef0a0c1a094d120bb (patch) | |
tree | 15671ed8bd3597d2efe13aa57b755c66014acb57 /include/linux/ptrace.h | |
parent | c414a117c6094c3f86b533f97beaf45ef9075f03 (diff) | |
parent | 220bf991b0366cc50a94feede3d7341fa5710ee4 (diff) |
Merge branch 'v2.6.34-rc2' into drm-linus
Diffstat (limited to 'include/linux/ptrace.h')
-rw-r--r-- | include/linux/ptrace.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 56f2d63a5cbb..e1fb60729979 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -27,6 +27,26 @@ | |||
27 | #define PTRACE_GETSIGINFO 0x4202 | 27 | #define PTRACE_GETSIGINFO 0x4202 |
28 | #define PTRACE_SETSIGINFO 0x4203 | 28 | #define PTRACE_SETSIGINFO 0x4203 |
29 | 29 | ||
30 | /* | ||
31 | * Generic ptrace interface that exports the architecture specific regsets | ||
32 | * using the corresponding NT_* types (which are also used in the core dump). | ||
33 | * Please note that the NT_PRSTATUS note type in a core dump contains a full | ||
34 | * 'struct elf_prstatus'. But the user_regset for NT_PRSTATUS contains just the | ||
35 | * elf_gregset_t that is the pr_reg field of 'struct elf_prstatus'. For all the | ||
36 | * other user_regset flavors, the user_regset layout and the ELF core dump note | ||
37 | * payload are exactly the same layout. | ||
38 | * | ||
39 | * This interface usage is as follows: | ||
40 | * struct iovec iov = { buf, len}; | ||
41 | * | ||
42 | * ret = ptrace(PTRACE_GETREGSET/PTRACE_SETREGSET, pid, NT_XXX_TYPE, &iov); | ||
43 | * | ||
44 | * On the successful completion, iov.len will be updated by the kernel, | ||
45 | * specifying how much the kernel has written/read to/from the user's iov.buf. | ||
46 | */ | ||
47 | #define PTRACE_GETREGSET 0x4204 | ||
48 | #define PTRACE_SETREGSET 0x4205 | ||
49 | |||
30 | /* options set using PTRACE_SETOPTIONS */ | 50 | /* options set using PTRACE_SETOPTIONS */ |
31 | #define PTRACE_O_TRACESYSGOOD 0x00000001 | 51 | #define PTRACE_O_TRACESYSGOOD 0x00000001 |
32 | #define PTRACE_O_TRACEFORK 0x00000002 | 52 | #define PTRACE_O_TRACEFORK 0x00000002 |
@@ -244,6 +264,9 @@ static inline void user_enable_single_step(struct task_struct *task) | |||
244 | static inline void user_disable_single_step(struct task_struct *task) | 264 | static inline void user_disable_single_step(struct task_struct *task) |
245 | { | 265 | { |
246 | } | 266 | } |
267 | #else | ||
268 | extern void user_enable_single_step(struct task_struct *); | ||
269 | extern void user_disable_single_step(struct task_struct *); | ||
247 | #endif /* arch_has_single_step */ | 270 | #endif /* arch_has_single_step */ |
248 | 271 | ||
249 | #ifndef arch_has_block_step | 272 | #ifndef arch_has_block_step |
@@ -271,6 +294,8 @@ static inline void user_enable_block_step(struct task_struct *task) | |||
271 | { | 294 | { |
272 | BUG(); /* This can never be called. */ | 295 | BUG(); /* This can never be called. */ |
273 | } | 296 | } |
297 | #else | ||
298 | extern void user_enable_block_step(struct task_struct *); | ||
274 | #endif /* arch_has_block_step */ | 299 | #endif /* arch_has_block_step */ |
275 | 300 | ||
276 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO | 301 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO |