DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (777e60ca8853)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/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";
}