include/asm-i386/ptrace.h
11523 #ifndef _I386_PTRACE_H
11524 #define _I386_PTRACE_H
11525
11526 #define EBX 0
11527 #define ECX 1
11528 #define EDX 2
11529 #define ESI 3
11530 #define EDI 4
11531 #define EBP 5
11532 #define EAX 6
11533 #define DS 7
11534 #define ES 8
11535 #define FS 9
11536 #define GS 10
11537 #define ORIG_EAX 11
11538 #define EIP 12
11539 #define CS 13
11540 #define EFL 14
11541 #define UESP 15
11542 #define SS 16
11543
11544 /* this struct defines the way the registers are stored
11545 * on the stack during a system call. */
11546 struct pt_regs {
11547 long ebx;
11548 long ecx;
11549 long edx;
11550 long esi;
11551 long edi;
11552 long ebp;
11553 long eax;
11554 int xds;
11555 int xes;
11556 long orig_eax;
11557 long eip;
11558 int xcs;
11559 long eflags;
11560 long esp;
11561 int xss;
11562 };
11563
11564 /* Arbitrarily choose the same ptrace numbers as used by
11565 * the Sparc code. */
11566 #define PTRACE_GETREGS 12
11567 #define PTRACE_SETREGS 13
11568 #define PTRACE_GETFPREGS 14
11569 #define PTRACE_SETFPREGS 15
11570
11571 #ifdef __KERNEL__
11572 #define user_mode(regs) \
11573 ((VM_MASK & (regs)->eflags) || (3 & (regs)->xcs))
11574 #define instruction_pointer(regs) ((regs)->eip)
11575 extern void show_regs(struct pt_regs *);
11576 #endif
11577
11578 #endif