#! /bin/sh

# used to filter helgrind output shown by gdb/vgdb.

dir=`dirname $0`

$dir/../helgrind/tests/filter_stderr "$@"              |

# filter vgdb messages
$dir/filter_vgdb |

# Perform Solaris-specific filtering.
if $dir/../tests/os_test solaris; then
   $dir/filter_helgrind_monitor_solaris
elif $dir/../tests/os_test freebsd; then
   gsed -e '/\(rtld_start.S\|kill.S\|_exit.S\|_select.S\): No such file or directory/d'
else
   cat
fi |

# and remove any remaining empty lines
sed -e '/^$/d'
