123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- #ifndef _SYS_PTRACE_H
- #define _SYS_PTRACE_H 1
- #include <features.h>
- #include <bits/wordsize.h>
- #undef PTRACE_GETREGS
- #undef PTRACE_SETREGS
- #undef PTRACE_GETFPREGS
- #undef PTRACE_SETFPREGS
- #undef PTRACE_READDATA
- #undef PTRACE_WRITEDATA
- #undef PTRACE_READTEXT
- #undef PTRACE_WRITETEXT
- #undef PTRACE_SUNDETACH
- __BEGIN_DECLS
- enum __ptrace_request
- {
-
- PTRACE_TRACEME = 0,
- #define PT_TRACE_ME PTRACE_TRACEME
-
- PTRACE_PEEKTEXT = 1,
- #define PT_READ_I PTRACE_PEEKTEXT
-
- PTRACE_PEEKDATA = 2,
- #define PT_READ_D PTRACE_PEEKDATA
-
- PTRACE_PEEKUSER = 3,
- #define PT_READ_U PTRACE_PEEKUSER
-
- PTRACE_POKETEXT = 4,
- #define PT_WRITE_I PTRACE_POKETEXT
-
- PTRACE_POKEDATA = 5,
- #define PT_WRITE_D PTRACE_POKEDATA
-
- PTRACE_POKEUSER = 6,
- #define PT_WRITE_U PTRACE_POKEUSER
-
- PTRACE_CONT = 7,
- #define PT_CONTINUE PTRACE_CONT
-
- PTRACE_KILL = 8,
- #define PT_KILL PTRACE_KILL
-
- PTRACE_SINGLESTEP = 9,
- #define PT_STEP PTRACE_SINGLESTEP
-
- PTRACE_DETACH = 11,
- #define PT_DETACH PTRACE_DETACH
-
- #define PTRACE_SUNDETACH PTRACE_DETACH
- #if __WORDSIZE == 32
-
- PTRACE_GETREGS = 12,
- #define PT_GETREGS PTRACE_GETREGS
-
- PTRACE_SETREGS = 13,
- #define PT_SETREGS PTRACE_SETREGS
-
- PTRACE_GETFPREGS = 14,
- #define PT_GETFPREGS PTRACE_GETFPREGS
-
- PTRACE_SETFPREGS = 15,
- #define PT_SETFPREGS PTRACE_SETFPREGS
- #endif
-
- PTRACE_ATTACH = 16,
- #define PT_ATTACH PTRACE_ATTACH
-
- PTRACE_WRITEDATA = 17,
- #define PTRACE_WRITEDATA PTRACE_WRITEDATA
-
- PTRACE_READTEXT = 18,
- #define PTRACE_READTEXT PTRACE_READTEXT
- #define PTRACE_READDATA PTRACE_READTEXT
-
- PTRACE_WRITETEXT = 19,
- #define PTRACE_WRITETEXT PTRACE_WRITETEXT
- #if __WORDSIZE == 64
-
- PTRACE_GETREGS = 22,
- #define PT_GETREGS PTRACE_GETREGS
-
- PTRACE_SETREGS = 23,
- #define PT_SETREGS PTRACE_SETREGS
- #endif
-
- PTRACE_SYSCALL = 24
- #define PTRACE_SYSCALL PTRACE_SYSCALL
- #if __WORDSIZE == 64
- ,
-
- PTRACE_GETFPREGS = 25,
- #define PT_GETFPREGS PTRACE_GETFPREGS
-
- PTRACE_SETFPREGS = 26
- #define PT_SETFPREGS PTRACE_SETFPREGS
- #endif
- };
- extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
- __END_DECLS
- #endif
|