File: filter_libc

package info (click to toggle)
valgrind 1%3A3.10.0-4~bpo7%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 97,940 kB
  • sloc: ansic: 589,429; xml: 21,096; exp: 8,751; cpp: 7,366; asm: 6,526; perl: 5,656; sh: 5,334; makefile: 4,946; haskell: 195
file content (39 lines) | stat: -rwxr-xr-x 1,166 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /usr/bin/perl -w

use strict;

while (<>)
{
    s/ __getsockname / getsockname /;
    s/ __sigaction / sigaction /;
    s/ __GI___/ __/;
    s/ __([a-z]*)_nocancel / $1 /;

    # "libSystem*" occurs on Darwin.
    s/\(in \/.*(libc|libSystem).*\)$/(in \/...libc...)/;
    s/\(within \/.*(libc|libSystem).*\)$/(within \/...libc...)/;

    # Filter out dynamic loader
    s/ \(in \/.*ld-.*so\)$//;

    # Remove the filename -- on some platforms (eg. Linux) it will be in
    # libc, on some (eg. Darwin) it will be in the main executable.
    s/\(below main\) \(.+\)$/(below main)/;

    # Merge the different C++ operator variations.
    s/(at.*)__builtin_new/$1...operator new.../;
    s/(at.*)operator new\(unsigned(| int| long)\)/$1...operator new.../;

    s/(at.*)__builtin_vec_new/$1...operator new.../;
    s/(at.*)operator new\[\]\(unsigned(| int| long)\)/$1...operator new[].../;

    s/(at.*)__builtin_delete/$1...operator delete.../;
    s/(at.*)operator delete\(void\*\)/$1...operator delete.../;

    s/(at.*)__builtin_vec_delete/$1...operator delete[].../;
    s/(at.*)operator delete\[\]\(void\*\)/$1...operator delete[].../;

    print;
}

exit 0;