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
6 * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
8 * Machine dependent structs and defines to help the user use
9 * the ptrace system call.
14 #include <asm/isadep.h>
15 #include <linux/types.h>
17 /* 0 - 31 are integer registers, 32 - 63 are fp registers. */
27 #ifndef _LANGUAGE_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.
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. */
46 unsigned long cp0_epc;
47 unsigned long cp0_badvaddr;
48 unsigned long cp0_status;
49 unsigned long cp0_cause;
52 #endif /* !(_LANGUAGE_ASSEMBLY) */
54 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
55 /* #define PTRACE_GETREGS 12 */
56 /* #define PTRACE_SETREGS 13 */
57 /* #define PTRACE_GETFPREGS 14 */
58 /* #define PTRACE_SETFPREGS 15 */
59 /* #define PTRACE_GETFPXREGS 18 */
60 /* #define PTRACE_SETFPXREGS 19 */
62 #define PTRACE_SETOPTIONS 21
64 /* options set using PTRACE_SETOPTIONS */
65 #define PTRACE_O_TRACESYSGOOD 0x00000001
67 #if 0 /* def _LANGUAGE_ASSEMBLY */
68 #include <asm/offset.h>
73 #ifndef _LANGUAGE_ASSEMBLY
75 * Does the process account for user or for system time?
77 #define user_mode(regs) (((regs)->cp0_status & KU_MASK) == KU_USER)
79 #define instruction_pointer(regs) ((regs)->cp0_epc)
81 extern void show_regs(struct pt_regs *);
82 #endif /* !(_LANGUAGE_ASSEMBLY) */
86 #endif /* _ASM_PTRACE_H */