Skip to content

Commit

Permalink
Fixed identification of header files in the include_preamble
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Ponomarenko committed Sep 27, 2013
1 parent 8a5b349 commit 2b029aa
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 25 deletions.
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ All rights reserved.
RELEASE INFORMATION

Project: ABI Compliance Checker (ACC)
Version: 1.99.8.3
Date: 2013-09-16
Version: 1.99.8.4
Date: 2013-09-27


This file explains how to install and setup environment
Expand Down
49 changes: 41 additions & 8 deletions abi-compliance-checker.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl
###########################################################################
# ABI Compliance Checker (ACC) 1.99.8.3
# ABI Compliance Checker (ACC) 1.99.8.4
# A tool for checking backward compatibility of a C/C++ library API
#
# Copyright (C) 2009-2010 The Linux Foundation
Expand Down Expand Up @@ -64,7 +64,7 @@
use Data::Dumper;
use Config;

my $TOOL_VERSION = "1.99.8.3";
my $TOOL_VERSION = "1.99.8.4";
my $ABI_DUMP_VERSION = "3.2";
my $OLDEST_SUPPORTED_VERSION = "1.18";
my $XML_REPORT_VERSION = "1.1";
Expand Down Expand Up @@ -93,7 +93,7 @@
$UserLang, $TargetHeadersPath, $BinaryOnly, $SourceOnly, $BinaryReportPath,
$SourceReportPath, $UseXML, $Browse, $OpenReport, $SortDump, $DumpFormat,
$ExtraInfo, $ExtraDump, $Force, $Tolerance, $Tolerant, $SkipSymbolsListPath,
$CheckInfo, $Quick, $AffectLimit, $AllAffected);
$CheckInfo, $Quick, $AffectLimit, $AllAffected, $CppIncompat);

my $CmdName = get_filename($0);
my %OS_LibExt = (
Expand Down Expand Up @@ -252,6 +252,7 @@
"test-dump!" => \$TestDump,
"debug!" => \$Debug,
"cpp-compatible!" => \$CppCompat,
"cpp-incompatible!" => \$CppIncompat,
"p|params=s" => \$ParamNamesPath,
"relpath1|relpath=s" => \$RelativeDirectory{1},
"relpath2=s" => \$RelativeDirectory{2},
Expand Down Expand Up @@ -664,6 +665,9 @@ ()
If your header files are written in C language and can be compiled
by the G++ compiler (i.e. don't use C++ keywords), then you can tell
the tool about this and speedup the analysis.

-cpp-incompatible
Set this option if input C header files use C++ keywords.

-p|-params PATH
Path to file with the function parameter names. It can be used
Expand Down Expand Up @@ -8686,9 +8690,16 @@ ()
{ # try to recompile
# FIXME: handle other errors and try to recompile
if($CppMode{$Version}==1
and index($Errors, "c99_")!=-1)
and index($Errors, "c99_")!=-1
and not defined $CppIncompat)
{ # disable c99 mode and try again
$CppMode{$Version}=-1;

if($Debug)
{
# printMsg("INFO", $Errors);
}

printMsg("INFO", "Disabling C++ compatibility mode");
resetLogging($Version);
$TMP_DIR = tempdir(CLEANUP=>1);
Expand Down Expand Up @@ -14961,16 +14972,16 @@ ($$)
my $TN1 = $TypeInfo{1}{$Tid1}{"Name"};
my $TN2 = $TypeInfo{2}{$Tid2}{"Name"};

my $TT1 = $TypeInfo{1}{$Tid1}{"Type"};
my $TT2 = $TypeInfo{2}{$Tid2}{"Type"};

if($Changed)
{ # different formats
if($UseOldDumps)
{ # old dumps
return 0;
}

my $TT1 = $TypeInfo{1}{$Tid1}{"Type"};
my $TT2 = $TypeInfo{2}{$Tid2}{"Type"};

my %Base1 = get_Type($Tid1, 1);
while(defined $Base1{"Type"} and $Base1{"Type"} eq "Typedef") {
%Base1 = get_OneStep_BaseType($Base1{"Tid"}, $TypeInfo{1});
Expand Down Expand Up @@ -15029,6 +15040,20 @@ ($$)
return 0;
}
}

if($TT1 eq "FuncPtr"
and $TT2 eq "FuncPtr")
{
my $TN1_C = $TN1;
my $TN2_C = $TN2;

$TN1_C=~s/\b(struct|union) //g;
$TN2_C=~s/\b(struct|union) //g;

if($TN1_C eq $TN2_C) {
return 0;
}
}
}
return 1;
}
Expand Down Expand Up @@ -19446,7 +19471,13 @@ ()
{
next if(not -d $DevelPath);

my @Files = cmd_find($DevelPath);
my @Files = cmd_find($DevelPath,"f");
foreach my $Link (cmd_find($DevelPath,"l"))
{ # add symbolic links
if(-f $Link) {
push(@Files, $Link);
}
}

if(not $CheckObjectsOnly)
{
Expand Down Expand Up @@ -20867,6 +20898,8 @@ ($)
# check GCC version
if($GCC_Ver=~/\A4\.8(|\.0|\.1)\Z/)
{ # bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57850
# introduced in 4.8
# fixed in 4.9
printMsg("WARNING", "Not working properly with GCC $GCC_Ver. Please update or downgrade GCC or use a local installation by --gcc-path=PATH option.");
$EMERGENCY_MODE_48 = 1;
}
Expand Down
13 changes: 8 additions & 5 deletions doc/Changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</style>
<script src="/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=monobook&amp;*"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Downloads", "wgTitle": "ABI Compliance Checker Downloads", "wgCurRevisionId": 8321, "wgArticleId": 2293, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Downloads", "wgTitle": "ABI Compliance Checker Downloads", "wgCurRevisionId": 8326, "wgArticleId": 2293, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
}
</script><script>if(window.mw){
mw.loader.load(["mediawiki.page.startup"]);
Expand All @@ -43,7 +43,7 @@ <h1 id="firstHeading" class="firstHeading">ABI Compliance Checker - Change Log</
</p>
<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="#Version_1.99.8.3_.28September_16.2C_2013.29"><span class="tocnumber">1</span> <span class="toctext">Version 1.99.8.3 (September 16, 2013)</span></a></li>
<li class="toclevel-1 tocsection-1"><a href="#Version_1.99.8.4_.28September_27.2C_2013.29"><span class="tocnumber">1</span> <span class="toctext">Version 1.99.8.4 (September 27, 2013)</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Version_1.99.7_.28July_01.2C_2013.29"><span class="tocnumber">2</span> <span class="toctext">Version 1.99.7 (July 01, 2013)</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Version_1.99.1_.28June_07.2C_2013.29"><span class="tocnumber">3</span> <span class="toctext">Version 1.99.1 (June 07, 2013)</span></a></li>
<li class="toclevel-1 tocsection-4"><a href="#Version_1.99_.28May_24.2C_2013.29"><span class="tocnumber">4</span> <span class="toctext">Version 1.99 (May 24, 2013)</span></a></li>
Expand Down Expand Up @@ -92,8 +92,8 @@ <h1 id="firstHeading" class="firstHeading">ABI Compliance Checker - Change Log</
<li class="toclevel-1 tocsection-47"><a href="#Version_1.0_.28July_31.2C_2009.29"><span class="tocnumber">47</span> <span class="toctext">Version 1.0 (July 31, 2009)</span></a></li>
</ul>
</td></tr></table>
<h2> <span class="mw-headline" id="Version_1.99.8.3_.28September_16.2C_2013.29"> Version 1.99.8.3 (September 16, 2013) </span></h2>
<p><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/1.99.8.3.tar.gz">abi-compliance-checker-1.99.8.3.tar.gz</a><br />
<h2> <span class="mw-headline" id="Version_1.99.8.4_.28September_27.2C_2013.29"> Version 1.99.8.4 (September 27, 2013) </span></h2>
<p><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/1.99.8.4.tar.gz">abi-compliance-checker-1.99.8.4.tar.gz</a><br />
</p><p><b>ACC 2.0</b> pre-release.
</p><p>This is a bug-fix release with a few new features.
</p>
Expand All @@ -105,6 +105,7 @@ <h2> <span class="mw-headline" id="Version_1.99.8.3_.28September_16.2C_2013.29">
</li></ul>
<ul><li> <b>New Options</b>
<ul><li> <a href="Options.html" title="ABI Compliance Checker Options">-affected-limit</a>
</li><li> <a href="Options.html" title="ABI Compliance Checker Options">-cpp-incompatible</a>
</li></ul>
</li></ul>
<ul><li> <b>Bug Fixes</b>
Expand All @@ -113,6 +114,8 @@ <h2> <span class="mw-headline" id="Version_1.99.8.3_.28September_16.2C_2013.29">
</li><li> Corrected descriptions of affected symbols in the report
</li><li> Fixed false alarms on changed offset of parameters
</li><li> Do not hang on class A&lt;N&gt;:public A&lt;N-1&gt;
</li><li> Corrected identification of header files in the include_preamble
</li><li> Corrected comparison of function pointer types
</li></ul>
</li></ul>
<ul><li> <b>Other</b>
Expand Down Expand Up @@ -1065,5 +1068,5 @@ <h2> <span class="mw-headline" id="Version_1.0_.28July_31.2C_2009.29"> Version 1
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key rasispdb:pcache:idhash:2293-0!*!0!!en!*!* and timestamp 20130916142009 -->
<!-- Saved in parser cache with key rasispdb:pcache:idhash:2293-0!*!0!!en!*!* and timestamp 20130927112837 -->
</div></div></div></div></div></body></html>
2 changes: 1 addition & 1 deletion doc/Descriptor.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,5 +510,5 @@ <h2> <span class="mw-headline" id="Examples"> Examples </span></h2>
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key rasispdb:pcache:idhash:2415-0!*!*!!en!*!* and timestamp 20130916085931 -->
<!-- Saved in parser cache with key rasispdb:pcache:idhash:2415-0!*!*!!en!*!* and timestamp 20130927113009 -->
</div></div></div></div></div></body></html>
9 changes: 6 additions & 3 deletions doc/Options.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</style>
<script src="/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=monobook&amp;*"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Options", "wgTitle": "ABI Compliance Checker Options", "wgCurRevisionId": 8307, "wgArticleId": 2442, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Options", "wgTitle": "ABI Compliance Checker Options", "wgCurRevisionId": 8327, "wgArticleId": 2442, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
}
</script><script>if(window.mw){
mw.loader.load(["mediawiki.page.startup"]);
Expand Down Expand Up @@ -195,6 +195,9 @@ <h2> <span class="mw-headline" id="Other_Options"> Other Options </span></h2>
<ul><li><b>-cpp-compatible</b>
</li></ul>
<div style="padding-left:40px;">If your header file is written in C language and can be compiled by the C++ compiler (i.e. doesn't contain C++-keywords), then you can tell ACC about this and speedup the analysis.</div><br />
<ul><li><b>-cpp-incompatible</b>
</li></ul>
<div style="padding-left:40px;">Set this option if input C header files use C++ keywords.</div><br />
<ul><li><b>-p|-params PATH</b>
</li></ul>
<div style="padding-left:40px;">Path to file with the function parameter names. It can be used for improving report view if the library header files don't contain parameter names. File format:</div><br />
Expand Down Expand Up @@ -277,11 +280,11 @@ <h2> <span class="mw-headline" id="Other_Options"> Other Options </span></h2>

<!--
NewPP limit report
Preprocessor node count: 88/1000000
Preprocessor node count: 89/1000000
Post-expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key rasispdb:pcache:idhash:2442-0!*!0!!en!*!* and timestamp 20130916092155 -->
<!-- Saved in parser cache with key rasispdb:pcache:idhash:2442-0!*!0!!en!*!* and timestamp 20130927112916 -->
</div></div></div></div></div></body></html>
6 changes: 3 additions & 3 deletions doc/Readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</style>
<script src="/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=monobook&amp;*"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker", "wgTitle": "ABI Compliance Checker", "wgCurRevisionId": 8322, "wgArticleId": 2292, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker", "wgTitle": "ABI Compliance Checker", "wgCurRevisionId": 8328, "wgArticleId": 2292, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []});
}
</script><script>if(window.mw){
mw.loader.load(["mediawiki.page.startup"]);
Expand Down Expand Up @@ -93,7 +93,7 @@ <h1 id="firstHeading" class="firstHeading">ABI Compliance Checker</h1>
<h2> <span class="mw-headline" id="Downloads"> Downloads </span></h2>
<h3> <span class="mw-headline" id="Releases"> Releases </span></h3>
<p>All releases can be downloaded from <b><a href="Changes.html" title="ABI Compliance Checker Downloads">this page</a></b> or <b><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/">github.com</a></b>.
</p><p>Latest release: <a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/1.99.8.3.tar.gz">1.99.8.3</a>
</p><p>Latest release: <a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/1.99.8.4.tar.gz">1.99.8.4</a>
</p>
<h3> <span class="mw-headline" id="Git"> Git </span></h3>
<p>Read-only access to the latest development version:<br />
Expand Down Expand Up @@ -499,5 +499,5 @@ <h2> <span class="mw-headline" id="Articles"> Articles </span></h2>
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key rasispdb:pcache:idhash:2292-0!*!0!!en!*!* and timestamp 20130916142030 -->
<!-- Saved in parser cache with key rasispdb:pcache:idhash:2292-0!*!0!!en!*!* and timestamp 20130927112946 -->
</div></div></div></div></div></body></html>
2 changes: 1 addition & 1 deletion doc/SysCheck/Descriptor.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,5 @@ <h2> <span class="mw-headline" id="Examples"> Examples </span></h2>
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key rasispdb:pcache:idhash:2657-0!*!*!!*!*!* and timestamp 20130916085929 -->
<!-- Saved in parser cache with key rasispdb:pcache:idhash:2657-0!*!*!!*!*!* and timestamp 20130926122940 -->
</div></div></div></div></div></body></html>
2 changes: 1 addition & 1 deletion doc/SysCheck/Examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,5 @@ <h3> <span class="mw-headline" id="Compare_ABI_Dumps_3"> Compare ABI Dumps </spa
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key rasispdb:pcache:idhash:2656-0!*!*!!en!*!* and timestamp 20130916010442 -->
<!-- Saved in parser cache with key rasispdb:pcache:idhash:2656-0!*!*!!en!*!* and timestamp 20130927113014 -->
</div></div></div></div></div></body></html>
2 changes: 1 addition & 1 deletion doc/SysCheck/Usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ <h2> <span class="mw-headline" id="Examples"> Examples </span></h2>
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key rasispdb:pcache:idhash:2655-0!*!0!!en!*!* and timestamp 20130916042438 -->
<!-- Saved in parser cache with key rasispdb:pcache:idhash:2655-0!*!0!!en!*!* and timestamp 20130927063354 -->
</div></div></div></div></div></body></html>

0 comments on commit 2b029aa

Please sign in to comment.