Dear All,

I like to propose a change to strace version 4.15 that re-enacts the currently 
hidden -z option for output filtering ("print successful syscalls only").

Please find attached a patch file against 4.15 release that implements a 
staging approach, i.e. builds output in memory but prints successful syscalls 
only when the -z option was given on the cmdline. The implementation is based 
on the STDIO library function open_memstream(); since it might not be available 
all every target system, respective code sections were guarded with "#ifdef 
_GNU_SOURCE" directives. To apply the patchfile:

               cd strace-4.15
               patch -p1 <strace-4.15i1.patch

Note 1: Since the syserror macro (defined in defs.h) does not distinguish 
between failed and not-returned, the "exit_group()" syscall will be filtered as 
well with -z.

Note 2: automake would not run on my system, therefore the patch has both 
Makefile.in and Makefile.am. The latter was  not tested.

Best regards,
Burkhard Kohl
mailto:burkhard.k...@intel.com


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de<http://www.intel.de>

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Attachment: strace-4.15i1.patch.tgz
Description: strace-4.15i1.patch.tgz

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to