tools/tests/ctor-dtor.pl
author neil@parkwaycc.co.uk
Thu, 05 Apr 2007 06:36:04 -0700
changeset 367 bdd7973f1da341456579a62367b9087dbe691921
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rwxr-xr-x
Followup to bug 375446 - gfxFontStyle is a struct, not a class rs=tor

#!/usr/bin/perl

use Cwd;

$curdir = cwd();

open( LOG, ">ctor-dtor-report" ) || print "can't open $?\n";

@path_fields = split(/\//,$curdir);

$path = join ("/",@path_fields);

print "Searching in " . $path . "\n";
open (REPORT, "find $path -name \"*.o\" -print | xargs nm -Bno | egrep \"_GLOBAL_\.[ID]|_tcf\" 2>&1 |" ) || die "open: $! \n";

while (<REPORT>) {
    print $_;
    print LOG $_;
}
close(REPORT);

if (-s "./ctor-dtor-report" > 0) {
    print "Global Constructors\/Destructors Found" . "\n";
}