filter_libc revision 436e89c602e787e7a27dd6624b09beed41a0da8a
1#! /usr/bin/perl -w 2 3use strict; 4 5while (<>) 6{ 7 s/ __getsockname / getsockname /; 8 s/ __sigaction / sigaction /; 9 s/ __GI___/ __/; 10 s/ __([a-z]*)_nocancel / $1 /; 11 12 # "libSystem*" occurs on Darwin. 13 s/\(in \/.*(libc|libSystem).*\)$/(in \/...libc...)/; 14 s/\(within \/.*(libc|libSystem).*\)$/(within \/...libc...)/; 15 16 # Filter out dynamic loader 17 s/ \(in \/.*ld-.*so\)$//; 18 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)/; 22 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.../; 26 27 s/(at.*)__builtin_vec_new/$1...operator new.../; 28 s/(at.*)operator new\[\]\(unsigned(| int| long)\)/$1...operator new[].../; 29 30 s/(at.*)__builtin_delete/$1...operator delete.../; 31 s/(at.*)operator delete\(void\*\)/$1...operator delete.../; 32 33 s/(at.*)__builtin_vec_delete/$1...operator delete[].../; 34 s/(at.*)operator delete\[\]\(void\*\)/$1...operator delete[].../; 35 36 print; 37} 38 39exit 0; 40