From: Julian Seward Date: Sat, 2 Jul 2005 20:41:25 +0000 (+0000) Subject: Improve filtering to get rid of suppressions, using magic incantations X-Git-Tag: svn/VALGRIND_3_0_0~230 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8fa9d5c66d898eef6cce33753bbee040f62bbc61;p=thirdparty%2Fvalgrind.git Improve filtering to get rid of suppressions, using magic incantations from Tom H and Ashley Pittman. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4088 --- diff --git a/memcheck/tests/filter_xml b/memcheck/tests/filter_xml index 51c4f21787..8a857c6146 100755 --- a/memcheck/tests/filter_xml +++ b/memcheck/tests/filter_xml @@ -6,4 +6,20 @@ sed "s/[0-9]*<\/pid>/...<\/pid>/" | sed "s/[0-9]*<\/ppid>/...<\/ppid>/" | sed "s/.*<\/obj>/...<\/obj>/" | sed "s/.*<\/line>/...<\/line>/" | -sed "s/.*<\/dir>/...<\/dir>/" +sed "s/.*<\/dir>/...<\/dir>/" | +sed "s/.*<\/count>/...<\/count>/" | +perl -0 -p -e "s/.*<\/suppcounts>/...<\/suppcounts>/s" + +# Collected wisdom re Perl magic incantation: +# +# From: Tom Hughes +# +# Two problems - one is that you need -p to force perl to loop over +# the input lines and apply your expression to each one and then print +# the results. +# +# The other is that as somebody else said you need to change the input +# record separator so that it reads in the whole file as a single line +# which you can do with the -0 switch. +# +# Hence -0 -p.