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 /include/asm-m68k/ptrace.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 'include/asm-m68k/ptrace.h')
-rw-r--r-- | include/asm-m68k/ptrace.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/include/asm-m68k/ptrace.h b/include/asm-m68k/ptrace.h new file mode 100644 index 000000000000..57e763d79bf4 --- /dev/null +++ b/include/asm-m68k/ptrace.h | |||
@@ -0,0 +1,80 @@ | |||
1 | #ifndef _M68K_PTRACE_H | ||
2 | #define _M68K_PTRACE_H | ||
3 | |||
4 | #define PT_D1 0 | ||
5 | #define PT_D2 1 | ||
6 | #define PT_D3 2 | ||
7 | #define PT_D4 3 | ||
8 | #define PT_D5 4 | ||
9 | #define PT_D6 5 | ||
10 | #define PT_D7 6 | ||
11 | #define PT_A0 7 | ||
12 | #define PT_A1 8 | ||
13 | #define PT_A2 9 | ||
14 | #define PT_A3 10 | ||
15 | #define PT_A4 11 | ||
16 | #define PT_A5 12 | ||
17 | #define PT_A6 13 | ||
18 | #define PT_D0 14 | ||
19 | #define PT_USP 15 | ||
20 | #define PT_ORIG_D0 16 | ||
21 | #define PT_SR 17 | ||
22 | #define PT_PC 18 | ||
23 | |||
24 | #ifndef __ASSEMBLY__ | ||
25 | |||
26 | /* this struct defines the way the registers are stored on the | ||
27 | stack during a system call. */ | ||
28 | |||
29 | struct pt_regs { | ||
30 | long d1; | ||
31 | long d2; | ||
32 | long d3; | ||
33 | long d4; | ||
34 | long d5; | ||
35 | long a0; | ||
36 | long a1; | ||
37 | long a2; | ||
38 | long d0; | ||
39 | long orig_d0; | ||
40 | long stkadj; | ||
41 | unsigned short sr; | ||
42 | unsigned long pc; | ||
43 | unsigned format : 4; /* frame format specifier */ | ||
44 | unsigned vector : 12; /* vector offset */ | ||
45 | }; | ||
46 | |||
47 | /* | ||
48 | * This is the extended stack used by signal handlers and the context | ||
49 | * switcher: it's pushed after the normal "struct pt_regs". | ||
50 | */ | ||
51 | struct switch_stack { | ||
52 | unsigned long d6; | ||
53 | unsigned long d7; | ||
54 | unsigned long a3; | ||
55 | unsigned long a4; | ||
56 | unsigned long a5; | ||
57 | unsigned long a6; | ||
58 | unsigned long retpc; | ||
59 | }; | ||
60 | |||
61 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
62 | #define PTRACE_GETREGS 12 | ||
63 | #define PTRACE_SETREGS 13 | ||
64 | #define PTRACE_GETFPREGS 14 | ||
65 | #define PTRACE_SETFPREGS 15 | ||
66 | |||
67 | #ifdef __KERNEL__ | ||
68 | |||
69 | #ifndef PS_S | ||
70 | #define PS_S (0x2000) | ||
71 | #define PS_M (0x1000) | ||
72 | #endif | ||
73 | |||
74 | #define user_mode(regs) (!((regs)->sr & PS_S)) | ||
75 | #define instruction_pointer(regs) ((regs)->pc) | ||
76 | #define profile_pc(regs) instruction_pointer(regs) | ||
77 | extern void show_regs(struct pt_regs *); | ||
78 | #endif /* __KERNEL__ */ | ||
79 | #endif /* __ASSEMBLY__ */ | ||
80 | #endif /* _M68K_PTRACE_H */ | ||