• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is part of ltrace.
3  * Copyright (C) 2012 Petr Machata, Red Hat Inc.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18  * 02110-1301 USA
19  */
20 #ifndef _TRACE_DEFS_H_
21 #define _TRACE_DEFS_H_
22 #include <sys/ptrace.h>
23 
24 /* If the system headers did not provide the constants, hard-code the
25  * normal values.  */
26 #ifndef PTRACE_OLDSETOPTIONS
27 # define PTRACE_OLDSETOPTIONS    21
28 #endif
29 
30 #ifndef PTRACE_SETOPTIONS
31 # define PTRACE_SETOPTIONS       0x4200
32 #endif
33 
34 #ifndef PTRACE_GETEVENTMSG
35 # define PTRACE_GETEVENTMSG      0x4201
36 #endif
37 
38 /* Options set using PTRACE_SETOPTIONS.  */
39 #ifndef PTRACE_O_TRACESYSGOOD
40 # define PTRACE_O_TRACESYSGOOD   0x00000001
41 #endif
42 
43 #ifndef PTRACE_O_TRACEFORK
44 # define PTRACE_O_TRACEFORK      0x00000002
45 #endif
46 
47 #ifndef PTRACE_O_TRACEVFORK
48 # define PTRACE_O_TRACEVFORK     0x00000004
49 #endif
50 
51 #ifndef PTRACE_O_TRACECLONE
52 # define PTRACE_O_TRACECLONE     0x00000008
53 #endif
54 
55 #ifndef PTRACE_O_TRACEEXEC
56 # define PTRACE_O_TRACEEXEC      0x00000010
57 #endif
58 
59 #ifndef PTRACE_O_TRACEVFORKDONE
60 # define PTRACE_O_TRACEVFORKDONE 0x00000020
61 #endif
62 
63 #ifndef PTRACE_O_TRACEEXIT
64 # define PTRACE_O_TRACEEXIT      0x00000040
65 #endif
66 
67 /* Wait extended result codes for the above trace options.  */
68 #ifndef PTRACE_EVENT_FORK
69 # define PTRACE_EVENT_FORK       1
70 #endif
71 
72 #ifndef PTRACE_EVENT_VFORK
73 # define PTRACE_EVENT_VFORK      2
74 #endif
75 
76 #ifndef PTRACE_EVENT_CLONE
77 # define PTRACE_EVENT_CLONE      3
78 #endif
79 
80 #ifndef PTRACE_EVENT_EXEC
81 # define PTRACE_EVENT_EXEC       4
82 #endif
83 
84 #ifndef PTRACE_EVENT_VFORK_DONE
85 # define PTRACE_EVENT_VFORK_DONE 5
86 #endif
87 
88 #ifndef PTRACE_EVENT_EXIT
89 # define PTRACE_EVENT_EXIT       6
90 #endif
91 
92 #endif /* _TRACE_DEFS_H_ */
93