]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/asm-sparc/ptrace.h
1 /* $Id: ptrace.h,v 1.25 1997/03/04 16:27:25 jj Exp $ */
2 #ifndef _SPARC_PTRACE_H
3 #define _SPARC_PTRACE_H
7 /* This struct defines the way the registers are stored on the
8 * stack during a system call and basically all traps.
18 unsigned long u_regs
[16]; /* globals and ins */
37 #define UREG_WIM UREG_G0
38 #define UREG_FADDR UREG_G0
39 #define UREG_FP UREG_I6
40 #define UREG_RETPC UREG_I7
42 /* A register window */
44 unsigned long locals
[8];
48 /* A Sparc stack frame */
50 unsigned long locals
[8];
52 struct sparc_stackf
*fp
;
53 unsigned long callers_pc
;
55 unsigned long xargs
[6];
56 unsigned long xxargs
[1];
59 #define TRACEREG_SZ sizeof(struct pt_regs)
60 #define STACKFRAME_SZ sizeof(struct sparc_stackf)
64 #define __ARCH_SYS_PTRACE 1
66 #define user_mode(regs) (!((regs)->psr & PSR_PS))
67 #define instruction_pointer(regs) ((regs)->pc)
68 unsigned long profile_pc(struct pt_regs
*);
69 extern void show_regs(struct pt_regs
*);
72 #else /* __ASSEMBLY__ */
73 /* For assembly code. */
74 #define TRACEREG_SZ 0x50
75 #define STACKFRAME_SZ 0x60
79 * The asm-offsets.h is a generated file, so we cannot include it.
80 * It may be OK for glibc headers, but it's utterly pointless for C code.
81 * The assembly code using those offsets has to include it explicitly.
83 /* #include <asm/asm-offsets.h> */
85 /* These are for pt_regs. */
109 /* Reg_window offsets */
127 /* Stack_frame offsets */
145 #define SF_XARG0 0x44
146 #define SF_XARG1 0x48
147 #define SF_XARG2 0x4c
148 #define SF_XARG3 0x50
149 #define SF_XARG4 0x54
150 #define SF_XARG5 0x58
151 #define SF_XXARG 0x5c
153 /* Stuff for the ptrace system call */
154 #define PTRACE_SUNATTACH 10
155 #define PTRACE_SUNDETACH 11
156 #define PTRACE_GETREGS 12
157 #define PTRACE_SETREGS 13
158 #define PTRACE_GETFPREGS 14
159 #define PTRACE_SETFPREGS 15
160 #define PTRACE_READDATA 16
161 #define PTRACE_WRITEDATA 17
162 #define PTRACE_READTEXT 18
163 #define PTRACE_WRITETEXT 19
164 #define PTRACE_GETFPAREGS 20
165 #define PTRACE_SETFPAREGS 21
167 #define PTRACE_GETUCODE 29 /* stupid bsd-ism */
170 #endif /* !(_SPARC_PTRACE_H) */