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 #include <linux/types.h>
13
14 /* 0 - 31 are integer registers, 32 - 63 are fp registers. */
15 #define FPR_BASE 32
16 #define PC 64
17 #define CAUSE 65
18 #define BADVADDR 66
19 #define MMHI 67
20 #define MMLO 68
21 #define FPC_CSR 69
22 #define FPC_EIR 70
23
24 #ifndef _LANGUAGE_ASSEMBLY
25
26 #define abi64_no_regargs \
27 unsigned long __dummy0, \
28 unsigned long __dummy1, \
29 unsigned long __dummy2, \
30 unsigned long __dummy3, \
31 unsigned long __dummy4, \
32 unsigned long __dummy5, \
33 unsigned long __dummy6, \
34 unsigned long __dummy7
35
36 /*
37 * This struct defines the way the registers are stored on the stack during a
38 * system call/exception. As usual the registers k0/k1 aren't being saved.
39 */
40 struct pt_regs {
41 /* Saved main processor registers. */
42 unsigned long regs[32];
43
44 /* Other saved registers. */
45 unsigned long lo;
46 unsigned long hi;
47
48 /*
49 * saved cp0 registers
50 */
51 unsigned long cp0_epc;
52 unsigned long cp0_badvaddr;
53 unsigned long cp0_status;
54 unsigned long cp0_cause;
55 };
56
57 #endif /* !(_LANGUAGE_ASSEMBLY__) */
58
59 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
60 /* #define PTRACE_GETREGS 12 */
61 /* #define PTRACE_SETREGS 13 */
62 /* #define PTRACE_GETFPREGS 14 */
63 /* #define PTRACE_SETFPREGS 15 */
64 /* #define PTRACE_GETFPXREGS 18 */
65 /* #define PTRACE_SETFPXREGS 19 */
66
67 #define PTRACE_SETOPTIONS 21
68
69 /* options set using PTRACE_SETOPTIONS */
70 #define PTRACE_O_TRACESYSGOOD 0x00000001
71
72 #ifdef _LANGUAGE_ASSEMBLY
73 #include <asm/offset.h>
74 #endif /* (_LANGUAGE_ASSEMBLY__) */
75
76 #ifdef __KERNEL__
77
78 #ifndef _LANGUAGE_ASSEMBLY
79 #define instruction_pointer(regs) ((regs)->cp0_epc)
80
81 extern void (*_show_regs)(struct pt_regs *);
82 #define show_regs(regs) _show_regs(regs)
83
84 #endif /* !(_LANGUAGE_ASSEMBLY__) */
85
86 #endif
87
88 #endif /* _ASM_PTRACE_H */
89
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.