418879820019df9be9e53237f224723cf7bbc157
[linux-flexiantxendom0-3.2.10.git] / include / asm-mips64 / ptrace.h
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
7  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8  */
9 #ifndef _ASM_PTRACE_H
10 #define _ASM_PTRACE_H
11
12 /* 0 - 31 are integer registers, 32 - 63 are fp registers.  */
13 #define FPR_BASE        32
14 #define PC              64
15 #define CAUSE           65
16 #define BADVADDR        66
17 #define MMHI            67
18 #define MMLO            68
19 #define FPC_CSR         69
20 #define FPC_EIR         70
21
22 #ifndef __ASSEMBLY__
23
24 #define abi64_no_regargs                                                \
25         unsigned long __dummy0,                                         \
26         unsigned long __dummy1,                                         \
27         unsigned long __dummy2,                                         \
28         unsigned long __dummy3,                                         \
29         unsigned long __dummy4,                                         \
30         unsigned long __dummy5,                                         \
31         unsigned long __dummy6,                                         \
32         unsigned long __dummy7
33
34 /*
35  * This struct defines the way the registers are stored on the stack during a
36  * system call/exception. As usual the registers k0/k1 aren't being saved.
37  */
38 struct pt_regs {
39         /* Saved main processor registers. */
40         unsigned long regs[32];
41
42         /* Other saved registers. */
43         unsigned long lo;
44         unsigned long hi;
45
46         /*
47          * saved cp0 registers
48          */
49         unsigned long cp0_epc;
50         unsigned long cp0_badvaddr;
51         unsigned long cp0_status;
52         unsigned long cp0_cause;
53 };
54
55 #endif /* !__ASSEMBLY__ */
56
57 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
58 /* #define PTRACE_GETREGS               12 */
59 /* #define PTRACE_SETREGS               13 */
60 /* #define PTRACE_GETFPREGS             14 */
61 /* #define PTRACE_SETFPREGS             15 */
62 /* #define PTRACE_GETFPXREGS            18 */
63 /* #define PTRACE_SETFPXREGS            19 */
64
65 #define PTRACE_OLDSETOPTIONS    21
66
67 #define PTRACE_GET_THREAD_AREA  25
68 #define PTRACE_SET_THREAD_AREA  26
69
70 #ifdef __ASSEMBLY__
71 #include <asm/offset.h>
72 #endif /* !__ASSEMBLY__ */
73
74 #ifdef __KERNEL__
75
76 #ifndef __ASSEMBLY__
77 #define instruction_pointer(regs) ((regs)->cp0_epc)
78
79 extern void show_regs(struct pt_regs *);
80 #endif /* !__ASSEMBLY__ */
81
82 #endif
83
84 #endif /* _ASM_PTRACE_H */