drd: Add a consistency check
[valgrind.git] / tests / filter_libc
blob46ba26814c61bcdf1d3e11ac4bbdcf1bd05ab071
1 #! /usr/bin/perl -w
3 use strict;
5 while (<>)
7 s/ __getsockname / getsockname /;
8 s/ __sigaction / sigaction /;
9 s/ __GI___/ __/;
10 s/ __([a-z]*)_nocancel / $1 /;
12 # "libSystem*" occurs on Darwin.
13 s/\(in \/.*(libc|libSystem).*\)$/(in \/...libc...)/;
14 s/\(within \/.*(libc|libSystem).*\)$/(within \/...libc...)/;
16 # Filter out dynamic loader
17 s/ \(in \/.*ld-.*so\)$//;
19 # Remove the filename -- on some platforms (eg. Linux) it will be in
20 # libc, on some (eg. Darwin) it will be in the main executable.
21 s/\(below main\) \(.+\)$/(below main)/;
23 # Merge the different C++ operator variations.
24 s/(at.*)__builtin_new/$1...operator new.../;
25 s/(at.*)operator new\(unsigned(| int| long)\)/$1...operator new.../;
27 s/(at.*)__builtin_vec_new/$1...operator new.../;
28 s/(at.*)operator new\[\]\(unsigned(| int| long)\)/$1...operator new[].../;
30 s/(at.*)__builtin_delete/$1...operator delete.../;
31 s/(at.*)operator delete\(void\*\)/$1...operator delete.../;
33 s/(at.*)__builtin_vec_delete/$1...operator delete[].../;
34 s/(at.*)operator delete\[\]\(void\*\)/$1...operator delete[].../;
36 print;
39 exit 0;