tools/tests/isa-module.pl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/tests/isa-module.pl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +#!/usr/bin/perl -w
     1.5 +
     1.6 +use Cwd;
     1.7 +
     1.8 +$curdir = cwd();
     1.9 +
    1.10 +@path_fields = split(/\//,$curdir);
    1.11 +
    1.12 +$path = join ("/",@path_fields);
    1.13 +
    1.14 +print "Searching in " . $path . "\n";
    1.15 +
    1.16 +open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetModule 2>&1 |" ) || die "open: $! \n";
    1.17 +
    1.18 +print "Modules:\n";
    1.19 +while (<REPORT>) {
    1.20 +    $module = $_;
    1.21 +    $module =~ s/:.*//;
    1.22 +    print $module;
    1.23 +}
    1.24 +close(REPORT);
    1.25 +
    1.26 +open (REPORT, "find $path -name \"*.so\" -print | xargs nm -Bno | egrep NSGetFactory 2>&1 |" ) || die "open: $! \n";
    1.27 +
    1.28 +print "\nComponents:\n";
    1.29 +while (<REPORT>) {
    1.30 +    $module = $_;
    1.31 +    $module =~ s/:.*//;
    1.32 +    print $module;
    1.33 +}
    1.34 +close(REPORT);

mercurial