xref: /linux/arch/microblaze/include/uapi/asm/ptrace.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 /*
2  * Copyright (C) 2006 Atmark Techno, Inc.
3  *
4  * This file is subject to the terms and conditions of the GNU General Public
5  * License. See the file "COPYING" in the main directory of this archive
6  * for more details.
7  */
8 
9 #ifndef _UAPI_ASM_MICROBLAZE_PTRACE_H
10 #define _UAPI_ASM_MICROBLAZE_PTRACE_H
11 
12 #ifndef __ASSEMBLY__
13 
14 typedef unsigned long microblaze_reg_t;
15 
16 struct pt_regs {
17 	microblaze_reg_t r0;
18 	microblaze_reg_t r1;
19 	microblaze_reg_t r2;
20 	microblaze_reg_t r3;
21 	microblaze_reg_t r4;
22 	microblaze_reg_t r5;
23 	microblaze_reg_t r6;
24 	microblaze_reg_t r7;
25 	microblaze_reg_t r8;
26 	microblaze_reg_t r9;
27 	microblaze_reg_t r10;
28 	microblaze_reg_t r11;
29 	microblaze_reg_t r12;
30 	microblaze_reg_t r13;
31 	microblaze_reg_t r14;
32 	microblaze_reg_t r15;
33 	microblaze_reg_t r16;
34 	microblaze_reg_t r17;
35 	microblaze_reg_t r18;
36 	microblaze_reg_t r19;
37 	microblaze_reg_t r20;
38 	microblaze_reg_t r21;
39 	microblaze_reg_t r22;
40 	microblaze_reg_t r23;
41 	microblaze_reg_t r24;
42 	microblaze_reg_t r25;
43 	microblaze_reg_t r26;
44 	microblaze_reg_t r27;
45 	microblaze_reg_t r28;
46 	microblaze_reg_t r29;
47 	microblaze_reg_t r30;
48 	microblaze_reg_t r31;
49 	microblaze_reg_t pc;
50 	microblaze_reg_t msr;
51 	microblaze_reg_t ear;
52 	microblaze_reg_t esr;
53 	microblaze_reg_t fsr;
54 	int pt_mode;
55 };
56 
57 #ifndef __KERNEL__
58 
59 /* pt_regs offsets used by gdbserver etc in ptrace syscalls */
60 #define PT_GPR(n)	((n) * sizeof(microblaze_reg_t))
61 #define PT_PC		(32 * sizeof(microblaze_reg_t))
62 #define PT_MSR		(33 * sizeof(microblaze_reg_t))
63 #define PT_EAR		(34 * sizeof(microblaze_reg_t))
64 #define PT_ESR		(35 * sizeof(microblaze_reg_t))
65 #define PT_FSR		(36 * sizeof(microblaze_reg_t))
66 #define PT_KERNEL_MODE	(37 * sizeof(microblaze_reg_t))
67 
68 #endif /* __KERNEL */
69 
70 #endif /* __ASSEMBLY__ */
71 
72 #endif /* _UAPI_ASM_MICROBLAZE_PTRACE_H */
73