diff options
Diffstat (limited to 'include/asm-powerpc/ptrace.h')
| -rw-r--r-- | include/asm-powerpc/ptrace.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h index 4ad77a13f865..13fccc5a4119 100644 --- a/include/asm-powerpc/ptrace.h +++ b/include/asm-powerpc/ptrace.h | |||
| @@ -92,6 +92,11 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
| 92 | set_thread_flag(TIF_NOERROR); \ | 92 | set_thread_flag(TIF_NOERROR); \ |
| 93 | } while(0) | 93 | } while(0) |
| 94 | 94 | ||
| 95 | struct task_struct; | ||
| 96 | extern unsigned long ptrace_get_reg(struct task_struct *task, int regno); | ||
| 97 | extern int ptrace_put_reg(struct task_struct *task, int regno, | ||
| 98 | unsigned long data); | ||
| 99 | |||
| 95 | /* | 100 | /* |
| 96 | * We use the least-significant bit of the trap field to indicate | 101 | * We use the least-significant bit of the trap field to indicate |
| 97 | * whether we have saved the full set of registers, or only a | 102 | * whether we have saved the full set of registers, or only a |
| @@ -158,9 +163,7 @@ do { \ | |||
| 158 | 163 | ||
| 159 | #define PT_NIP 32 | 164 | #define PT_NIP 32 |
| 160 | #define PT_MSR 33 | 165 | #define PT_MSR 33 |
| 161 | #ifdef __KERNEL__ | ||
| 162 | #define PT_ORIG_R3 34 | 166 | #define PT_ORIG_R3 34 |
| 163 | #endif | ||
| 164 | #define PT_CTR 35 | 167 | #define PT_CTR 35 |
| 165 | #define PT_LNK 36 | 168 | #define PT_LNK 36 |
| 166 | #define PT_XER 37 | 169 | #define PT_XER 37 |
| @@ -169,11 +172,12 @@ do { \ | |||
| 169 | #define PT_MQ 39 | 172 | #define PT_MQ 39 |
| 170 | #else | 173 | #else |
| 171 | #define PT_SOFTE 39 | 174 | #define PT_SOFTE 39 |
| 175 | #endif | ||
| 172 | #define PT_TRAP 40 | 176 | #define PT_TRAP 40 |
| 173 | #define PT_DAR 41 | 177 | #define PT_DAR 41 |
| 174 | #define PT_DSISR 42 | 178 | #define PT_DSISR 42 |
| 175 | #define PT_RESULT 43 | 179 | #define PT_RESULT 43 |
| 176 | #endif | 180 | #define PT_REGS_COUNT 44 |
| 177 | 181 | ||
| 178 | #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ | 182 | #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ |
| 179 | 183 | ||
| @@ -229,7 +233,17 @@ do { \ | |||
| 229 | #define PTRACE_GET_DEBUGREG 25 | 233 | #define PTRACE_GET_DEBUGREG 25 |
| 230 | #define PTRACE_SET_DEBUGREG 26 | 234 | #define PTRACE_SET_DEBUGREG 26 |
| 231 | 235 | ||
| 232 | /* Additional PTRACE requests implemented on PowerPC. */ | 236 | /* (new) PTRACE requests using the same numbers as x86 and the same |
| 237 | * argument ordering. Additionally, they support more registers too | ||
| 238 | */ | ||
| 239 | #define PTRACE_GETREGS 12 | ||
| 240 | #define PTRACE_SETREGS 13 | ||
| 241 | #define PTRACE_GETFPREGS 14 | ||
| 242 | #define PTRACE_SETFPREGS 15 | ||
| 243 | #define PTRACE_GETREGS64 22 | ||
| 244 | #define PTRACE_SETREGS64 23 | ||
| 245 | |||
| 246 | /* (old) PTRACE requests with inverted arguments */ | ||
| 233 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ | 247 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ |
| 234 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ | 248 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ |
| 235 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | 249 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ |
