tools/tests/isa-module.pl
author Ehsan Akhgari <ehsan@mozilla.com>
Wed, 05 Dec 2012 20:59:26 -0500
changeset 120772 f0112085d83683e7c6c781ece342a0eb08cebbc6
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rwxr-xr-x
Bug 817337 - Add a JS module to get the most recent browser window, with the option of restricting the search to include only private windows; r=dao

#!/usr/bin/perl -w

use Cwd;

$curdir = cwd();

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

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

print "Searching in " . $path . "\n";

open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetModule 2>&1 |" ) || die "open: $! \n";

print "Modules:\n";
while (<REPORT>) {
    $module = $_;
    $module =~ s/:.*//;
    print $module;
}
close(REPORT);

open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetFactory 2>&1 |" ) || die "open: $! \n";

print "\nComponents:\n";
while (<REPORT>) {
    $module = $_;
    $module =~ s/:.*//;
    print $module;
}
close(REPORT);