2005-06-08 Dmitry V. Levin <ldv@altlinux.org>
Introduce "-e trace=desc".
* defs.h (TRACE_DESC): New flag.
* syscall.c: Define TD macro before include of syscallent files
and undefine it afterwards.
(lookup_class): Recognize "desc" keyword.
* strace.1: Document "-e trace=desc".
* freebsd/i386/syscallent.h: Mark those syscalls which take a
file descriptor as an argument or return a file descriptor with
TD flag.
* linux/alpha/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent2.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* sunos4/syscallent.h: Likewise.
* svr4/syscallent.h: Likewise.
Fixes RH#159400.
diff --git a/syscall.c b/syscall.c
index 675b3f4..241dfa4 100644
--- a/syscall.c
+++ b/syscall.c
@@ -118,6 +118,7 @@
#include "syscall.h"
/* Define these shorthand notations to simplify the syscallent files. */
+#define TD TRACE_DESC
#define TF TRACE_FILE
#define TI TRACE_IPC
#define TN TRACE_NETWORK
@@ -147,6 +148,7 @@
int nsyscalls;
/* Now undef them since short defines cause wicked namespace pollution. */
+#undef TD
#undef TF
#undef TI
#undef TN
@@ -371,6 +373,8 @@
return TRACE_PROCESS;
if (strcmp(s, "signal") == 0)
return TRACE_SIGNAL;
+ if (strcmp(s, "desc") == 0)
+ return TRACE_DESC;
return -1;
}