root/include/linux/ptrace.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_PTRACE_H
   2 #define _LINUX_PTRACE_H
   3 /* ptrace.h */
   4 /* structs and defines to help the user use the ptrace system call. */
   5 
   6 /* has the defines to get at the registers. */
   7 
   8 #define PTRACE_TRACEME             0
   9 #define PTRACE_PEEKTEXT            1
  10 #define PTRACE_PEEKDATA            2
  11 #define PTRACE_PEEKUSR             3
  12 #define PTRACE_POKETEXT            4
  13 #define PTRACE_POKEDATA            5
  14 #define PTRACE_POKEUSR             6
  15 #define PTRACE_CONT                7
  16 #define PTRACE_KILL                8
  17 #define PTRACE_SINGLESTEP          9
  18 
  19 #define PTRACE_ATTACH           0x10
  20 #define PTRACE_DETACH           0x11
  21 
  22 #define PTRACE_SYSCALL            24
  23 
  24 /* use ptrace (3 or 6, pid, PT_EXCL, data); to read or write
  25    the processes registers. */
  26 
  27 #define EBX 0
  28 #define ECX 1
  29 #define EDX 2
  30 #define ESI 3
  31 #define EDI 4
  32 #define EBP 5
  33 #define EAX 6
  34 #define DS 7
  35 #define ES 8
  36 #define FS 9
  37 #define GS 10
  38 #define ORIG_EAX 11
  39 #define EIP 12
  40 #define CS  13
  41 #define EFL 14
  42 #define UESP 15
  43 #define SS   16
  44 
  45 
  46 /* this struct defines the way the registers are stored on the 
  47    stack during a system call. */
  48 
  49 struct pt_regs {
  50         long ebx;
  51         long ecx;
  52         long edx;
  53         long esi;
  54         long edi;
  55         long ebp;
  56         long eax;
  57         unsigned short ds, __dsu;
  58         unsigned short es, __esu;
  59         unsigned short fs, __fsu;
  60         unsigned short gs, __gsu;
  61         long orig_eax;
  62         long eip;
  63         unsigned short cs, __csu;
  64         long eflags;
  65         long esp;
  66         unsigned short ss, __ssu;
  67 };
  68 
  69 #endif

/* [previous][next][first][last][top][bottom][index][help] */