]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/linux-26-headers/include/asm-x86/ptrace.h
Update
[l4.git] / l4 / pkg / linux-26-headers / include / asm-x86 / ptrace.h
1 #ifndef _ASM_X86_PTRACE_H
2 #define _ASM_X86_PTRACE_H
3
4         /* For */
5 #include <asm/ptrace-abi.h>
6 #include <asm/processor-flags.h>
7
8
9 #ifndef __ASSEMBLY__
10
11 #ifdef __i386__
12 /* this struct defines the way the registers are stored on the
13    stack during a system call. */
14
15
16 struct pt_regs {
17         long ebx;
18         long ecx;
19         long edx;
20         long esi;
21         long edi;
22         long ebp;
23         long eax;
24         int  xds;
25         int  xes;
26         int  xfs;
27         int  xgs;
28         long orig_eax;
29         long eip;
30         int  xcs;
31         long eflags;
32         long esp;
33         int  xss;
34 };
35
36
37 #else /* __i386__ */
38
39
40 struct pt_regs {
41 /*
42  * C ABI says these regs are callee-preserved. They aren't saved on kernel entry
43  * unless syscall needs a complete, fully filled "struct pt_regs".
44  */
45         unsigned long r15;
46         unsigned long r14;
47         unsigned long r13;
48         unsigned long r12;
49         unsigned long rbp;
50         unsigned long rbx;
51 /* These regs are callee-clobbered. Always saved on kernel entry. */
52         unsigned long r11;
53         unsigned long r10;
54         unsigned long r9;
55         unsigned long r8;
56         unsigned long rax;
57         unsigned long rcx;
58         unsigned long rdx;
59         unsigned long rsi;
60         unsigned long rdi;
61 /*
62  * On syscall entry, this is syscall#. On CPU exception, this is error code.
63  * On hw interrupt, it's IRQ number:
64  */
65         unsigned long orig_rax;
66 /* Return frame for iretq */
67         unsigned long rip;
68         unsigned long cs;
69         unsigned long eflags;
70         unsigned long rsp;
71         unsigned long ss;
72 /* top of stack page */
73 };
74
75 #endif /* !__i386__ */
76
77
78
79 #endif /* !__ASSEMBLY__ */
80
81 #endif /* _ASM_X86_PTRACE_H */