Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[deliverable/linux.git] / include / asm-x86_64 / ptrace.h
1 #ifndef _X86_64_PTRACE_H
2 #define _X86_64_PTRACE_H
3
4 #include <asm/ptrace-abi.h>
5
6 #ifndef __ASSEMBLY__
7
8 struct pt_regs {
9 unsigned long r15;
10 unsigned long r14;
11 unsigned long r13;
12 unsigned long r12;
13 unsigned long rbp;
14 unsigned long rbx;
15 /* arguments: non interrupts/non tracing syscalls only save upto here*/
16 unsigned long r11;
17 unsigned long r10;
18 unsigned long r9;
19 unsigned long r8;
20 unsigned long rax;
21 unsigned long rcx;
22 unsigned long rdx;
23 unsigned long rsi;
24 unsigned long rdi;
25 unsigned long orig_rax;
26 /* end of arguments */
27 /* cpu exception frame or undefined */
28 unsigned long rip;
29 unsigned long cs;
30 unsigned long eflags;
31 unsigned long rsp;
32 unsigned long ss;
33 /* top of stack page */
34 };
35
36 #endif
37
38 #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
39 #define user_mode(regs) (!!((regs)->cs & 3))
40 #define user_mode_vm(regs) user_mode(regs)
41 #define instruction_pointer(regs) ((regs)->rip)
42 extern unsigned long profile_pc(struct pt_regs *regs);
43 void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
44
45 struct task_struct;
46
47 extern unsigned long
48 convert_rip_to_linear(struct task_struct *child, struct pt_regs *regs);
49
50 enum {
51 EF_CF = 0x00000001,
52 EF_PF = 0x00000004,
53 EF_AF = 0x00000010,
54 EF_ZF = 0x00000040,
55 EF_SF = 0x00000080,
56 EF_TF = 0x00000100,
57 EF_IE = 0x00000200,
58 EF_DF = 0x00000400,
59 EF_OF = 0x00000800,
60 EF_IOPL = 0x00003000,
61 EF_IOPL_RING0 = 0x00000000,
62 EF_IOPL_RING1 = 0x00001000,
63 EF_IOPL_RING2 = 0x00002000,
64 EF_NT = 0x00004000, /* nested task */
65 EF_RF = 0x00010000, /* resume */
66 EF_VM = 0x00020000, /* virtual mode */
67 EF_AC = 0x00040000, /* alignment */
68 EF_VIF = 0x00080000, /* virtual interrupt */
69 EF_VIP = 0x00100000, /* virtual interrupt pending */
70 EF_ID = 0x00200000, /* id */
71 };
72
73 #endif
74
75 #endif
This page took 0.038311 seconds and 6 git commands to generate.