1#ifndef _ASM_X86_PTRACE_H
2#define _ASM_X86_PTRACE_H
3
4#include <asm/ptrace-abi.h>
5
6#ifndef __ASSEMBLY__
7
8#ifdef __i386__
9/* this struct defines the way the registers are stored on the
10   stack during a system call. */
11
12struct pt_regs {
13	long ebx;
14	long ecx;
15	long edx;
16	long esi;
17	long edi;
18	long ebp;
19	long eax;
20	int  xds;
21	int  xes;
22	int  xfs;
23	/* int  xgs; */
24	long orig_eax;
25	long eip;
26	int  xcs;
27	long eflags;
28	long esp;
29	int  xss;
30};
31
32
33#else /* __i386__ */
34
35struct pt_regs {
36	unsigned long r15;
37	unsigned long r14;
38	unsigned long r13;
39	unsigned long r12;
40	unsigned long rbp;
41	unsigned long rbx;
42/* arguments: non interrupts/non tracing syscalls only save upto here*/
43	unsigned long r11;
44	unsigned long r10;
45	unsigned long r9;
46	unsigned long r8;
47	unsigned long rax;
48	unsigned long rcx;
49	unsigned long rdx;
50	unsigned long rsi;
51	unsigned long rdi;
52	unsigned long orig_rax;
53/* end of arguments */
54/* cpu exception frame or undefined */
55	unsigned long rip;
56	unsigned long cs;
57	unsigned long eflags;
58	unsigned long rsp;
59	unsigned long ss;
60/* top of stack page */
61};
62
63#endif /* !__i386__ */
64#endif /* !__ASSEMBLY__ */
65
66#endif
67