blob: 6940c6b85a3f2b40dfda0a497545ce36fb2a39e2 [file] [log] [blame]
njn25e49d8e72002-09-23 09:36:25 +00001#! /bin/sh
2
sewardj77b38022004-12-14 09:18:57 +00003# This filter should be applied to *every* stderr result. It removes
4# Valgrind startup stuff and pid numbers.
njn25e49d8e72002-09-23 09:36:25 +00005
sewardjb5f6f512005-03-10 23:59:00 +00006dir=`dirname $0`
7
fitzhardinge39de4b42003-10-31 07:12:21 +00008# Remove ==pid== and --pid-- and ++pid++ and **pid** strings
sewardj2f3bcd22006-12-12 01:38:15 +00009sed "s/\(==\|--\|\+\+\|\*\*\)[0-9]\{1,7\}\1 //" |
sewardjb6837202006-10-17 01:48:41 +000010
11# Remove any --pid:0: strings (debuglog level zero output)
sewardj2f3bcd22006-12-12 01:38:15 +000012sed "/^--[0-9]\{1,7\}:0:*/d" |
sewardjb6837202006-10-17 01:48:41 +000013
14# Remove "WARNING: assuming toc 0x.." strings
15sed "/^WARNING: assuming toc 0x*/d" |
njn25e49d8e72002-09-23 09:36:25 +000016
njnb9c427c2004-12-01 14:14:42 +000017# Remove "Using valgrind..." line and the following
18# copyright notice line. Tools have to filter their own line themselves.
19sed "/^Using valgrind-.*, a dynamic binary instrumentation framework/ , /./ d" |
njn25e49d8e72002-09-23 09:36:25 +000020
sewardj77b38022004-12-14 09:18:57 +000021# ... and also remove the "Using LibVEX..." line and the one after it.
sewardj8b20c222004-12-20 05:44:49 +000022sed "/^Using LibVEX rev .*, a library for dynamic binary translation/ , /./ d" |
sewardj77b38022004-12-14 09:18:57 +000023
njn25e49d8e72002-09-23 09:36:25 +000024# Remove other introductory lines
mueller3547d0b2004-01-03 15:02:59 +000025sed "/Estimated CPU clock rate is [0-9]* MHz/d" |
sewardj77b38022004-12-14 09:18:57 +000026sed "/For more details, rerun with: -v/d" |
njn25e49d8e72002-09-23 09:36:25 +000027
sewardj45f4e7c2005-09-27 19:20:21 +000028# Anonymise line numbers in vg_replace_malloc.c, remove dirname if present
29sed "s/\(m_replacemalloc\/\)\?vg_replace_malloc.c:[0-9]*/vg_replace_malloc.c:.../" |
njncb130522003-05-05 09:09:08 +000030
fitzhardinge98abfc72003-12-16 02:05:15 +000031# Hide suppressed error counts
mueller3547d0b2004-01-03 15:02:59 +000032sed "s/^\(ERROR SUMMARY[^(]*(suppressed: \)[0-9]*\( from \)[0-9]*)$/\10\20)/" |
fitzhardinge98abfc72003-12-16 02:05:15 +000033
34
daywalker5b881112003-04-24 01:01:01 +000035# Reduce some libc incompatibility
sewardjb5f6f512005-03-10 23:59:00 +000036$dir/filter_libc |
thughesdd468ff2004-02-29 13:00:18 +000037
38# Remove line info out of order warnings
thughes18467b72004-03-16 11:03:09 +000039sed "/warning: line info addresses out of order/d" |
40
bartbce804c2008-03-22 07:52:44 +000041# Older bash versions print abnormal termination messages on the stderr
42# of the bash process. Newer bash versions redirect such messages properly.
43# Suppress any redirected abnormal termination messages. You can find the
44# complete list of messages in the bash source file siglist.c.
njn9818bee2009-02-11 00:21:53 +000045sed -r "/^(Segmentation fault|Alarm clock|Aborted|Bus error)( \(core dumped\))?$/d" |
bartbce804c2008-03-22 07:52:44 +000046
thughes18467b72004-03-16 11:03:09 +000047# Remove any ": dumping core" message as the user might have a
48# limit set that prevents the core dump
njn5281fd12009-04-15 07:11:36 +000049sed "s/\(signal [0-9]* (SIG[A-Z]*)\): dumping core/\1/" |
50
51# Remove the size in "The main thread stack size..." message.
52sed "s/The main thread stack size used in this run was [0-9]*/The main thread stack size used in this run was .../"
53