Skip to content

Commit

Permalink
Released 1.9. Improved support for ABI Viewer and ABI Dumper EE.
Browse files Browse the repository at this point in the history
  • Loading branch information
lvc committed Oct 12, 2016
1 parent 576863c commit 8400069
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions abi-tracker.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl
##################################################################
# ABI Tracker 1.8
# ABI Tracker 1.9
# A tool to visualize ABI changes timeline of a C/C++ software library
#
# Copyright (C) 2015-2016 Andrey Ponomarenko's ABI Laboratory
Expand All @@ -13,7 +13,7 @@
#
# REQUIREMENTS
# ============
# Perl 5 (5.8 or newer)
# Perl 5
# Elfutils (eu-readelf)
# ABI Dumper (0.99.16 or newer)
# Vtable-Dumper (1.1 or newer)
Expand Down Expand Up @@ -42,7 +42,7 @@
use Cwd qw(abs_path cwd);
use Data::Dumper;

my $TOOL_VERSION = "1.8";
my $TOOL_VERSION = "1.9";
my $DB_NAME = "Tracker.data";
my $TMP_DIR = tempdir(CLEANUP=>1);

Expand Down Expand Up @@ -1456,7 +1456,7 @@ ($)
if(not @Objects)
{
printMsg("ERROR", "can't find objects");
return;
return 1;
}

my $TmpDir = $TMP_DIR."/objects";
Expand Down Expand Up @@ -2321,11 +2321,21 @@ ($$)
$Dir .= "/".$Md5;
my $Output = $Dir."/symbols.html";

my $Cmd = $ABI_VIEWER." -skip-std -vnum \"$V\" -output \"$Dir\" \"".getDirname($Dump)."\"";
my $DumpDir = getDirname($Dump);

if(not -d $DumpDir."/debug")
{
printMsg("ERROR", "please rebuild ABI dumps");
return 1;
}

my $Cmd = $ABI_VIEWER." -skip-std -vnum \"$V\" -output \"$Dir\" \"".$DumpDir."\"";

qx/$Cmd/; # execute

$DB->{"ABIView_D"}{$V}{$Md5}{"Path"} = $Output;

return 0;
}

sub diffABIs($$$$)
Expand Down Expand Up @@ -3800,6 +3810,12 @@ ($)
return `$T -dumpversion`;
}

sub getToolVerInfo($)
{
my $T = $_[0];
return `$T -version`;
}

sub scenario()
{
$Data::Dumper::Sortkeys = 1;
Expand Down Expand Up @@ -3849,7 +3865,7 @@ ()
exitStatus("Module_Error", "the version of ABI Dumper should be $ABI_DUMPER_VERSION or newer");
}

if(cmpVersions_S($Version, "1.0")>=0) {
if(getToolVerInfo($ABI_DUMPER)=~/EE/) {
$ABI_DUMPER_EE = 1;
}
}
Expand Down

0 comments on commit 8400069

Please sign in to comment.