1#ifndef _PPC_PTRACE_H
2#define _PPC_PTRACE_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#include <linux/config.h>
21
22#ifndef __ASSEMBLY__
23#ifdef CONFIG_PPC64BRIDGE
24#define PPC_REG unsigned long
25#else
26#define PPC_REG unsigned long
27#endif
28struct pt_regs {
29 PPC_REG gpr[32];
30 PPC_REG nip;
31 PPC_REG msr;
32 PPC_REG orig_gpr3;
33 PPC_REG ctr;
34 PPC_REG link;
35 PPC_REG xer;
36 PPC_REG ccr;
37 PPC_REG mq;
38
39 PPC_REG trap;
40 PPC_REG dar;
41 PPC_REG dsisr;
42 PPC_REG result;
43};
44#endif
45
46#define STACK_FRAME_OVERHEAD 16
47
48
49#define __SIGNAL_FRAMESIZE 64
50
51#define instruction_pointer(regs) ((regs)->nip)
52#define user_mode(regs) (((regs)->msr & MSR_PR) != 0)
53
54
55
56
57
58
59#define PT_R0 0
60#define PT_R1 1
61#define PT_R2 2
62#define PT_R3 3
63#define PT_R4 4
64#define PT_R5 5
65#define PT_R6 6
66#define PT_R7 7
67#define PT_R8 8
68#define PT_R9 9
69#define PT_R10 10
70#define PT_R11 11
71#define PT_R12 12
72#define PT_R13 13
73#define PT_R14 14
74#define PT_R15 15
75#define PT_R16 16
76#define PT_R17 17
77#define PT_R18 18
78#define PT_R19 19
79#define PT_R20 20
80#define PT_R21 21
81#define PT_R22 22
82#define PT_R23 23
83#define PT_R24 24
84#define PT_R25 25
85#define PT_R26 26
86#define PT_R27 27
87#define PT_R28 28
88#define PT_R29 29
89#define PT_R30 30
90#define PT_R31 31
91
92#define PT_NIP 32
93#define PT_MSR 33
94#ifdef __KERNEL__
95#define PT_ORIG_R3 34
96#endif
97#define PT_CTR 35
98#define PT_LNK 36
99#define PT_XER 37
100#define PT_CCR 38
101#define PT_MQ 39
102
103#define PT_FPR0 48
104#define PT_FPR31 (PT_FPR0 + 2*31)
105#define PT_FPSCR (PT_FPR0 + 2*32 + 1)
106
107#endif
108