sewardj | 21082ff | 2004-10-19 13:11:35 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | # This filter should be applied to *every* stderr results. It removes Valgrind |
| 4 | # startup stuff and pid numbers. |
| 5 | |
| 6 | # Remove ==pid== and --pid-- and ++pid++ and **pid** strings |
| 7 | sed "s/\(==\|--\|\+\+\|\*\*\)[0-9]\{1,5\}\1 //" | |
| 8 | |
| 9 | # Remove "<name>, a <description> for $ARCH-$OS." line and the following |
| 10 | # copyright notice line. Works for tool and core intro lines. |
| 11 | sed "/^.*, .* for .*-.*\./ , /./ d" | |
| 12 | |
| 13 | # Remove other introductory lines |
| 14 | sed "/Estimated CPU clock rate is [0-9]* MHz/d" | |
| 15 | sed "/For more details, rerun with: -v/d" | |
| 16 | |
| 17 | # Anonymise line numbers in vg_replace_malloc.c |
| 18 | sed "s/vg_replace_malloc.c:[0-9]*/vg_replace_malloc.c:.../" | |
| 19 | |
| 20 | # Anonymise vg_intercept lines |
| 21 | sed "s/vg_intercept.c:[0-9]*/vg_intercept.c:.../" | |
| 22 | |
| 23 | # Anonymise vg_libpthread lines |
| 24 | sed "s/vg_libpthread.c:[0-9]*/vg_libpthread.c:.../" | |
| 25 | |
| 26 | # Hide suppressed error counts |
| 27 | sed "s/^\(ERROR SUMMARY[^(]*(suppressed: \)[0-9]*\( from \)[0-9]*)$/\10\20)/" | |
| 28 | |
| 29 | |
| 30 | # Reduce some libc incompatibility |
| 31 | sed "s/ __getsockname / getsockname /" | |
| 32 | sed "s/ __sigaction / sigaction /" | |
| 33 | sed "s/ __GI___/ __/" | |
| 34 | sed "s/ __\([a-z]*\)_nocancel / \1 /" | |
| 35 | |
| 36 | # Remove line info out of order warnings |
| 37 | sed "/warning: line info addresses out of order/d" | |
| 38 | |
| 39 | # Remove any ": dumping core" message as the user might have a |
| 40 | # limit set that prevents the core dump |
| 41 | sed "s/\(signal [0-9]* (SIG[A-Z]*)\): dumping core/\1/" |