tools/tests/ctor-dtor.pl
author Dave Camp <dcamp@mozilla.com>
Sat, 25 Aug 2012 11:04:46 -0700
changeset 103461 328402a45248dbcfebbcd2a5e96ce3e8a755234c
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rwxr-xr-x
Bug 785335 - Changing an elements tagName collapses the tree node with no way to expand the tree node. r=jwalker

#!/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";
}