Import 2.3.12pre3
[davej-history.git] / include / asm-mips / ptrace.h
blob81aeb70ca7a12a8f297648819700df64d68da8a3
1 /* $Id: ptrace.h,v 1.3 1998/07/09 21:45:21 ralf Exp $
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
5 * for more details.
7 * Copyright (C) 1994, 1995, 1996, 1997, 1998 by Ralf Baechle
9 * Machine dependent structs and defines to help the user use
10 * the ptrace system call.
12 #ifndef __ASM_MIPS_PTRACE_H
13 #define __ASM_MIPS_PTRACE_H
15 #include <linux/types.h>
17 /* 0 - 31 are integer registers, 32 - 63 are fp registers. */
18 #define FPR_BASE 32
19 #define PC 64
20 #define CAUSE 65
21 #define BADVADDR 66
22 #define MMHI 67
23 #define MMLO 68
24 #define FPC_CSR 69
25 #define FPC_EIR 70
27 #ifndef __ASSEMBLY__
29 * This struct defines the way the registers are stored on the stack during a
30 * system call/exception. As usual the registers k0/k1 aren't being saved.
32 struct pt_regs {
33 /* Pad bytes for argument save space on the stack. */
34 unsigned long pad0[6];
36 /* Saved main processor registers. */
37 unsigned long regs[32];
39 /* Other saved registers. */
40 unsigned long lo;
41 unsigned long hi;
44 * saved cp0 registers
46 unsigned long cp0_epc;
47 unsigned long cp0_badvaddr;
48 unsigned long cp0_status;
49 unsigned long cp0_cause;
52 #endif /* !(__ASSEMBLY__) */
54 #include <asm/offset.h>
56 #ifdef __KERNEL__
58 #ifndef __ASSEMBLY__
60 * Does the process account for user or for system time?
62 extern int (*user_mode)(struct pt_regs *);
64 #define instruction_pointer(regs) ((regs)->cp0_epc)
66 extern void (*show_regs)(struct pt_regs *);
67 #endif /* !(__ASSEMBLY__) */
69 #endif
71 #endif /* __ASM_MIPS_PTRACE_H */