Merge with Linux 2.5.74.
[linux-2.6/linux-mips.git] / include / asm-sh / ptrace.h
blobc40825d91a952afa053d8d2f07025263f384ef71
1 #ifndef __ASM_SH_PTRACE_H
2 #define __ASM_SH_PTRACE_H
4 #include <asm/processor.h>
5 #include <asm/ubc.h>
7 /*
8 * Copyright (C) 1999, 2000 Niibe Yutaka
13 * GCC defines register number like this:
14 * -----------------------------
15 * 0 - 15 are integer registers
16 * 17 - 22 are control/special registers
17 * 24 - 39 fp registers
18 * 40 - 47 xd registers
19 * 48 - fpscr register
20 * -----------------------------
22 * We follows above, except:
23 * 16 --- program counter (PC)
24 * 22 --- syscall #
25 * 23 --- floating point communication register
27 #define REG_REG0 0
28 #define REG_REG15 15
30 #define REG_PC 16
32 #define REG_PR 17
33 #define REG_SR 18
34 #define REG_GBR 19
35 #define REG_MACH 20
36 #define REG_MACL 21
38 #define REG_SYSCALL 22
40 #define REG_FPUL 23
42 #define REG_FPREG0 24
43 #define REG_FPREG15 39
44 #define REG_XDREG0 40
45 #define REG_XDREG14 47
46 #define REG_FPSCR 48
48 /* options set using PTRACE_SETOPTIONS */
49 #define PTRACE_O_TRACESYSGOOD 0x00000001
52 * This struct defines the way the registers are stored on the
53 * kernel stack during a system call or other kernel entry.
55 struct pt_regs {
56 unsigned long regs[16];
57 unsigned long pc;
58 unsigned long pr;
59 unsigned long sr;
60 unsigned long gbr;
61 unsigned long mach;
62 unsigned long macl;
63 long tra;
66 #ifdef __KERNEL__
67 #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
68 #define instruction_pointer(regs) ((regs)->pc)
69 extern void show_regs(struct pt_regs *);
70 #endif
72 #endif /* __ASM_SH_PTRACE_H */