Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


ptrace.h
01: #ifndef _LINUX_PTRACE_H
02: #define _LINUX_PTRACE_H
03: /* ptrace.h */
04: /* structs and defines to help the user use the ptrace system call. */
05: 
06: /* has the defines to get at the registers. */
07: 
08: #define PTRACE_TRACEME             0
09: #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             16
20: #define PTRACE_DETACH             17
21: 
22: #define PTRACE_SYSCALL            24
23: 
24: /* 0x4200-0x4300 are reserved for architecture-independent additions.  */
25: #define PTRACE_SETOPTIONS       0x4200
26: #define PTRACE_GETEVENTMSG      0x4201
27: #define PTRACE_GETSIGINFO       0x4202
28: #define PTRACE_SETSIGINFO       0x4203
29: 
30: /*
31:  * Generic ptrace interface that exports the architecture specific regsets
32:  * using the corresponding NT_* types (which are also used in the core dump).
33:  * Please note that the NT_PRSTATUS note type in a core dump contains a full
34:  * 'struct elf_prstatus'. But the user_regset for NT_PRSTATUS contains just the
35:  * elf_gregset_t that is the pr_reg field of 'struct elf_prstatus'. For all the
36:  * other user_regset flavors, the user_regset layout and the ELF core dump note
37:  * payload are exactly the same layout.
38:  *
39:  * This interface usage is as follows:
40:  *      struct iovec iov = { buf, len};
41:  *
42:  *      ret = ptrace(PTRACE_GETREGSET/PTRACE_SETREGSET, pid, NT_XXX_TYPE, &iov);
43:  *
44:  * On the successful completion, iov.len will be updated by the kernel,
45:  * specifying how much the kernel has written/read to/from the user's iov.buf.
46:  */
47: #define PTRACE_GETREGSET        0x4204
48: #define PTRACE_SETREGSET        0x4205
49: 
50: #define PTRACE_SEIZE            0x4206
51: #define PTRACE_INTERRUPT        0x4207
52: #define PTRACE_LISTEN           0x4208
53: 
54: /* flags in @data for PTRACE_SEIZE */
55: #define PTRACE_SEIZE_DEVEL      0x80000000 /* temp flag for development */
56: 
57: /* options set using PTRACE_SETOPTIONS */
58: #define PTRACE_O_TRACESYSGOOD   0x00000001
59: #define PTRACE_O_TRACEFORK      0x00000002
60: #define PTRACE_O_TRACEVFORK     0x00000004
61: #define PTRACE_O_TRACECLONE     0x00000008
62: #define PTRACE_O_TRACEEXEC      0x00000010
63: #define PTRACE_O_TRACEVFORKDONE 0x00000020
64: #define PTRACE_O_TRACEEXIT      0x00000040
65: #define PTRACE_O_TRACESECCOMP   0x00000080
66: 
67: #define PTRACE_O_MASK           0x000000ff
68: 
69: /* Wait extended result codes for the above trace options.  */
70: #define PTRACE_EVENT_FORK       1
71: #define PTRACE_EVENT_VFORK      2
72: #define PTRACE_EVENT_CLONE      3
73: #define PTRACE_EVENT_EXEC       4
74: #define PTRACE_EVENT_VFORK_DONE 5
75: #define PTRACE_EVENT_EXIT       6
76: #define PTRACE_EVENT_STOP       7
77: #define PTRACE_EVENT_SECCOMP    8
78: 
79: #include <asm/ptrace.h>
80: 
81: 
82: #endif
83: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/