From: Dmitry V. Levin Date: Tue, 19 Jul 2011 22:13:11 +0000 (+0000) Subject: Check for additional PTRACE_* constants X-Git-Tag: v4.7~338 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b0df40644ca23fe068d7f004dbc15b07ff85086;p=strace Check for additional PTRACE_* constants * configure.ac (AC_CHECK_DECLS): Add PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEEXIT, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE and PTRACE_EVENT_EXIT. * defs.h [LINUX]: Define these PTRACE_* constants when they are not provided by . Reported-by: Douglas Mencken Reported-by: Steve Bennett --- diff --git a/configure.ac b/configure.ac index f94ca005..6b88df87 100644 --- a/configure.ac +++ b/configure.ac @@ -310,12 +310,18 @@ AC_CHECK_DECLS([ PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, + PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, PTRACE_O_TRACECLONE, + PTRACE_O_TRACEEXEC, + PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK, - PTRACE_EVENT_CLONE],,, [#include ]) + PTRACE_EVENT_CLONE, + PTRACE_EVENT_EXEC, + PTRACE_EVENT_VFORK_DONE, + PTRACE_EVENT_EXIT],,, [#include ]) AC_PATH_PROG([PERL], [perl]) diff --git a/defs.h b/defs.h index 0e80868d..b34f4429 100644 --- a/defs.h +++ b/defs.h @@ -317,6 +317,10 @@ extern int mp_ioctl(int f, int c, void *a, int s); # if !HAVE_DECL_PTRACE_GETSIGINFO # define PTRACE_GETSIGINFO 0x4202 # endif + +# if !HAVE_DECL_PTRACE_O_TRACESYSGOOD +# define PTRACE_O_TRACESYSGOOD 0x00000001 +# endif # if !HAVE_DECL_PTRACE_O_TRACEFORK # define PTRACE_O_TRACEFORK 0x00000002 # endif @@ -326,6 +330,12 @@ extern int mp_ioctl(int f, int c, void *a, int s); # if !HAVE_DECL_PTRACE_O_TRACECLONE # define PTRACE_O_TRACECLONE 0x00000008 # endif +# if !HAVE_DECL_PTRACE_O_TRACEEXEC +# define PTRACE_O_TRACEEXEC 0x00000010 +# endif +# if !HAVE_DECL_PTRACE_O_TRACEEXIT +# define PTRACE_O_TRACEEXIT 0x00000040 +# endif # if !HAVE_DECL_PTRACE_EVENT_FORK # define PTRACE_EVENT_FORK 1 @@ -336,6 +346,15 @@ extern int mp_ioctl(int f, int c, void *a, int s); # if !HAVE_DECL_PTRACE_EVENT_CLONE # define PTRACE_EVENT_CLONE 3 # endif +# if !HAVE_DECL_PTRACE_EVENT_EXEC +# define PTRACE_EVENT_EXEC 4 +# endif +# if !HAVE_DECL_PTRACE_EVENT_VFORK_DONE +# define PTRACE_EVENT_VFORK_DONE 5 +# endif +# if !HAVE_DECL_PTRACE_EVENT_EXIT +# define PTRACE_EVENT_EXIT 6 +# endif #endif /* LINUX */ #if !defined __GNUC__