New Upstream Snapshot - abi-dumper

Ready changes

Summary

Merged new upstream version: 1.2+git20210913.1.16bb467 (was: 1.2).

Resulting package

Built on 2023-02-01T17:14 (took 13m22s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots abi-dumper

Lintian Result

Diff

diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 5773b1d..0000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-# These are supported funding model platforms
-
-patreon: LINUXABI
-custom: https://abi-laboratory.pro/?view=donate
diff --git a/INSTALL b/INSTALL
index 6a0bf08..b044c15 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,13 +1,13 @@
 
-Copyright (C) 2013-2017 Andrey Ponomarenko's ABI Laboratory
+Copyright (C) 2013-2021 Andrey Ponomarenko's ABI Laboratory
 All rights reserved.
 
 
 RELEASE INFORMATION
 
 Project:           ABI Dumper
-Version:           1.1
-Date:              August 30, 2017
+Version:           1.3
+Date:              September 13, 2021
 
 
 This file explains how to install and setup environment
diff --git a/README.md b/README.md
index 20b1485..995a3e0 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-ABI Dumper 1.2
+ABI Dumper 1.3
 ==============
 
 ABI Dumper — a tool to dump ABI of an ELF object containing DWARF debug info.
diff --git a/abi-dumper.pl b/abi-dumper.pl
old mode 100644
new mode 100755
index 9c07b70..545308f
--- a/abi-dumper.pl
+++ b/abi-dumper.pl
@@ -1,9 +1,9 @@
 #!/usr/bin/perl
 ###########################################################################
-# ABI Dumper 1.2
+# ABI Dumper 1.3
 # Dump ABI of an ELF object containing DWARF debug info
 #
-# Copyright (C) 2013-2020 Andrey Ponomarenko's ABI Laboratory
+# Copyright (C) 2013-2021 Andrey Ponomarenko's ABI Laboratory
 #
 # Written by Andrey Ponomarenko
 #
@@ -47,7 +47,7 @@ use Cwd qw(abs_path cwd realpath);
 use Storable qw(dclone);
 use Data::Dumper;
 
-my $TOOL_VERSION = "1.2";
+my $TOOL_VERSION = "1.3";
 my $ABI_DUMP_VERSION = "3.5";
 my $ORIG_DIR = cwd();
 my $TMP_DIR = tempdir(CLEANUP=>1);
@@ -93,7 +93,7 @@ my %ERROR_CODE = (
 
 my $ShortUsage = "ABI Dumper $TOOL_VERSION
 Dump ABI of an ELF object containing DWARF debug info
-Copyright (C) 2019 Andrey Ponomarenko's ABI Laboratory
+Copyright (C) 2021 Andrey Ponomarenko's ABI Laboratory
 License: GNU LGPL 2.1
 
 Usage: $CmdName [options] [object]
@@ -409,6 +409,7 @@ my %TypeType = (
     "subroutine_type"=>"Func",
     "array_type"=>"Array",
     "base_type"=>"Intrinsic",
+    "atomic_type"=>"Intrinsic",
     "unspecified_type"=>"Unspecified",
     "const_type"=>"Const",
     "pointer_type"=>"Pointer",
@@ -757,7 +758,7 @@ sub readSymbols($)
         if(my ($Value, $Size, $Type, $Bind, $Vis, $Ndx, $Symbol) = readline_ELF($_))
         { # read ELF entry
             $Symbol_Bind{$Symbol} = $Bind;
-            if(index($Symbol, '@'))
+            if(index($Symbol, '@')!=-1)
             {
                 if($Symbol=~/\A(.+?)\@/) {
                     $Symbol_Bind{$1} = $Bind;
@@ -944,12 +945,25 @@ sub readAltInfo($)
                 if(/\A\s*(.+?)\Z/) {
                     $DirTable{keys(%DirTable)+1} = $1;
                 }
+                elsif(/\A\s*(\d+)\s+(.+?)\s+\(\d+\)\Z/)
+                { # F34
+                    $DirTable{$1} = $2;
+                }
             }
         }
         
-        if(/(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/)
+        my ($Num, $Dir, $File) = ();
+        
+        if(/(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/) {
+            ($Num, $Dir, $File) = ($1, $2, $3)
+        }
+        elsif(/(\d+)\s+([^ ]+)\s+\(\d+\)\,\s+(\d+)/)
+        {  # F34
+            ($Num, $File, $Dir) = ($1, $2, $3);
+        }
+        
+        if($File)
         {
-            my ($Num, $Dir, $File) = ($1, $2, $3);
             chomp($File);
             
             if(defined $AddDirs)
@@ -1181,9 +1195,13 @@ sub readDWARFInfo($)
             
             if(defined $DirTable_Def)
             {
-                if(/\A\s*(.+?)\Z/) {
+                if(/\A\s*([^\[\]\(\)]+?)\Z/) {
                     $DirTable{keys(%DirTable)+1} = $1;
                 }
+                elsif(/\A\s*(\d+)\s+(.+?)\s+\(\d+\)\Z/)
+                { # F34
+                    $DirTable{$1} = $2;
+                }
             }
         }
         
@@ -1191,21 +1209,32 @@ sub readDWARFInfo($)
         and /Table at offset (\w+)/) {
             $Offset = $1;
         }
-        elsif(defined $Offset
-        and /(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/)
+        elsif(defined $Offset)
         {
-            my ($Num, $Dir, $File) = ($1, $2, $3);
-            chomp($File);
+            my ($Num, $Dir, $File) = ();
             
-            if(defined $AddDirs)
+            if(/(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/) {
+                ($Num, $Dir, $File) = ($1, $2, $3);
+            }
+            elsif(/(\d+)\s+([^ ]+)\s+\(\d+\)\,\s+(\d+)/)
+            { # F34
+                ($Num, $File, $Dir) = ($1, $2, $3);
+            }
+            
+            if($File)
             {
-                if(my $DName = $DirTable{$Dir})
+                chomp($File);
+                
+                if(defined $AddDirs)
                 {
-                    $File = $DName."/".$File;
+                    if(my $DName = $DirTable{$Dir})
+                    {
+                        $File = $DName."/".$File;
+                    }
                 }
+                
+                $SourceFile{$Offset}{$Num} = $File;
             }
-            
-            $SourceFile{$Offset}{$Num} = $File;
         }
     }
     close(SRC);
@@ -1226,6 +1255,8 @@ sub readDWARFInfo($)
         open(LOC, $EU_READELF_L." $AddOpt --debug-dump=loc \"$Path\" 2>\"$TMP_DIR/error\" |");
     }
     
+    my $Offset = undef;
+    
     while(<LOC>)
     {
         if(/\A \[\s*(\w+)\].*\[\s*\w+\]\s*(.+)\Z/) {
@@ -1234,6 +1265,14 @@ sub readDWARFInfo($)
         elsif(/\A \[\s*(\w+)\]/) {
             $DebugLoc{$1} = "";
         }
+        elsif(/Offset:\s+(.+?),/)
+        { # F34
+            $Offset = $1;
+        }
+        elsif($Offset and /\A\s+\[\s*\w+\]\s*(.+)\Z/)
+        { # F34
+            $DebugLoc{$Offset} = $1;
+        }
     }
     close(LOC);
     
@@ -1493,9 +1532,11 @@ sub readDWARFDump($$)
                 
                 if($Val=~/\A\(\w+\)\s*(-?)(\w+)\Z/)
                 { # (data1) 1c
-                    $Val = hex($2);
-                    if($1) {
-                        $Val = -$Val;
+                    if ($2 != 0xFFFFFFFFFFFFFFFF) {
+                        $Val = hex($2);
+                        if($1) {
+                            $Val = -$Val;
+                       }
                     }
                 }
                 else
@@ -1611,7 +1652,7 @@ sub readDWARFDump($$)
                             $Val=~s/\A\"//;
                             $Val=~s/\"\Z//;
                             
-                            if($Val=~/GNU\s+(C\d*|C\+\+|GIMPLE)\s+(.+)\Z/)
+                            if($Val=~/GNU\s+(C\d*|C\+\+\d*|GIMPLE)\s+(.+)\Z/)
                             {
                                 $SYS_GCCV = $2;
                                 if($SYS_GCCV=~/\A(\d+\.\d+)(\.\d+|)/)
@@ -4278,9 +4319,12 @@ sub setSource(@)
     
     if(defined $File)
     {
+        my $InfoName = undef;
         if(index($File, "(")!=-1)
         { # Support for new elfutils (Fedora 30)
-            $File=~s/.+ \((\d+)\)/$1/;
+            if($File=~s/\A(.+?)\s+\((\d+)\)/$1/) {
+                $InfoName = $1;
+            }
         }
         
         my $Name = undef;
@@ -4292,6 +4336,10 @@ sub setSource(@)
         { # imported
             $Name = $SourceFile_Alt{0}{$File};
         }
+
+        if(not $Name) {
+            $Name = $InfoName;
+        }
         
         if($Name=~/\.($HEADER_EXT)\Z/i
         or index($Name, ".")==-1)
@@ -6511,7 +6559,7 @@ sub scenario()
     if($ShowVersion)
     {
         printMsg("INFO", "ABI Dumper $TOOL_VERSION");
-        printMsg("INFO", "Copyright (C) 2019 Andrey Ponomarenko's ABI Laboratory");
+        printMsg("INFO", "Copyright (C) 2021 Andrey Ponomarenko's ABI Laboratory");
         printMsg("INFO", "License: GNU LGPL 2.1 <http://www.gnu.org/licenses/>");
         printMsg("INFO", "This program is free software: you can redistribute it and/or modify it.\n");
         printMsg("INFO", "Written by Andrey Ponomarenko.");
diff --git a/debian/changelog b/debian/changelog
index bc68719..41213a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+abi-dumper (1.2+git20210913.1.16bb467-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+  * Drop patch bug1020818.patch, present upstream.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Wed, 01 Feb 2023 17:05:12 -0000
+
 abi-dumper (1.2-3) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/debian/patches/bug1020818.patch b/debian/patches/bug1020818.patch
deleted file mode 100644
index d961ec7..0000000
--- a/debian/patches/bug1020818.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-Description: abi-dumper 1.2 doesn't work with today's binaries
-Author: Andrey Ponomarenko <andrewponomarenko@yandex.ru>
-Bug-Debian: https://bugs.debian.org/1020818
-Reviewed-by: Mathieu Malaterre <malat@debian.org>
-Forwarded: https://github.com/lvc/abi-dumper/commit/16bb467cd7d343dd3a16782b151b56cf15509594
-
-Index: abi-dumper/abi-dumper.pl
-===================================================================
---- abi-dumper.orig/abi-dumper.pl
-+++ abi-dumper/abi-dumper.pl
-@@ -409,6 +409,7 @@ my %TypeType = (
-     "subroutine_type"=>"Func",
-     "array_type"=>"Array",
-     "base_type"=>"Intrinsic",
-+    "atomic_type"=>"Intrinsic",
-     "unspecified_type"=>"Unspecified",
-     "const_type"=>"Const",
-     "pointer_type"=>"Pointer",
-@@ -944,12 +945,25 @@ sub readAltInfo($)
-                 if(/\A\s*(.+?)\Z/) {
-                     $DirTable{keys(%DirTable)+1} = $1;
-                 }
-+                elsif(/\A\s*(\d+)\s+(.+?)\s+\(\d+\)\Z/)
-+                { # F34
-+                    $DirTable{$1} = $2;
-+                }
-             }
-         }
-         
--        if(/(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/)
-+        my ($Num, $Dir, $File) = ();
-+        
-+        if(/(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/) {
-+            ($Num, $Dir, $File) = ($1, $2, $3)
-+        }
-+        elsif(/(\d+)\s+([^ ]+)\s+\(\d+\)\,\s+(\d+)/)
-+        {  # F34
-+            ($Num, $File, $Dir) = ($1, $2, $3);
-+        }
-+        
-+        if($File)
-         {
--            my ($Num, $Dir, $File) = ($1, $2, $3);
-             chomp($File);
-             
-             if(defined $AddDirs)
-@@ -1181,9 +1195,13 @@ sub readDWARFInfo($)
-             
-             if(defined $DirTable_Def)
-             {
--                if(/\A\s*(.+?)\Z/) {
-+                if(/\A\s*([^\[\]\(\)]+?)\Z/) {
-                     $DirTable{keys(%DirTable)+1} = $1;
-                 }
-+                elsif(/\A\s*(\d+)\s+(.+?)\s+\(\d+\)\Z/)
-+                { # F34
-+                    $DirTable{$1} = $2;
-+                }
-             }
-         }
-         
-@@ -1191,21 +1209,32 @@ sub readDWARFInfo($)
-         and /Table at offset (\w+)/) {
-             $Offset = $1;
-         }
--        elsif(defined $Offset
--        and /(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/)
-+        elsif(defined $Offset)
-         {
--            my ($Num, $Dir, $File) = ($1, $2, $3);
--            chomp($File);
-+            my ($Num, $Dir, $File) = ();
-             
--            if(defined $AddDirs)
-+            if(/(\d+)\s+(\d+)\s+\d+\s+\d+\s+([^ ]+)/) {
-+                ($Num, $Dir, $File) = ($1, $2, $3);
-+            }
-+            elsif(/(\d+)\s+([^ ]+)\s+\(\d+\)\,\s+(\d+)/)
-+            { # F34
-+                ($Num, $File, $Dir) = ($1, $2, $3);
-+            }
-+            
-+            if($File)
-             {
--                if(my $DName = $DirTable{$Dir})
-+                chomp($File);
-+                
-+                if(defined $AddDirs)
-                 {
--                    $File = $DName."/".$File;
-+                    if(my $DName = $DirTable{$Dir})
-+                    {
-+                        $File = $DName."/".$File;
-+                    }
-                 }
-+                
-+                $SourceFile{$Offset}{$Num} = $File;
-             }
--            
--            $SourceFile{$Offset}{$Num} = $File;
-         }
-     }
-     close(SRC);
-@@ -1226,6 +1255,8 @@ sub readDWARFInfo($)
-         open(LOC, $EU_READELF_L." $AddOpt --debug-dump=loc \"$Path\" 2>\"$TMP_DIR/error\" |");
-     }
-     
-+    my $Offset = undef;
-+    
-     while(<LOC>)
-     {
-         if(/\A \[\s*(\w+)\].*\[\s*\w+\]\s*(.+)\Z/) {
-@@ -1234,6 +1265,14 @@ sub readDWARFInfo($)
-         elsif(/\A \[\s*(\w+)\]/) {
-             $DebugLoc{$1} = "";
-         }
-+        elsif(/Offset:\s+(.+?),/)
-+        { # F34
-+            $Offset = $1;
-+        }
-+        elsif($Offset and /\A\s+\[\s*\w+\]\s*(.+)\Z/)
-+        { # F34
-+            $DebugLoc{$Offset} = $1;
-+        }
-     }
-     close(LOC);
-     
-@@ -1611,7 +1650,7 @@ sub readDWARFDump($$)
-                             $Val=~s/\A\"//;
-                             $Val=~s/\"\Z//;
-                             
--                            if($Val=~/GNU\s+(C\d*|C\+\+|GIMPLE)\s+(.+)\Z/)
-+                            if($Val=~/GNU\s+(C\d*|C\+\+\d*|GIMPLE)\s+(.+)\Z/)
-                             {
-                                 $SYS_GCCV = $2;
-                                 if($SYS_GCCV=~/\A(\d+\.\d+)(\.\d+|)/)
-@@ -4278,9 +4317,12 @@ sub setSource(@)
-     
-     if(defined $File)
-     {
-+        my $InfoName = undef;
-         if(index($File, "(")!=-1)
-         { # Support for new elfutils (Fedora 30)
--            $File=~s/.+ \((\d+)\)/$1/;
-+            if($File=~s/\A(.+?)\s+\((\d+)\)/$1/) {
-+                $InfoName = $1;
-+            }
-         }
-         
-         my $Name = undef;
-@@ -4292,6 +4334,10 @@ sub setSource(@)
-         { # imported
-             $Name = $SourceFile_Alt{0}{$File};
-         }
-+
-+        if(not $Name) {
-+            $Name = $InfoName;
-+        }
-         
-         if($Name=~/\.($HEADER_EXT)\Z/i
-         or index($Name, ".")==-1)
diff --git a/debian/patches/help2man.patch b/debian/patches/help2man.patch
index 7d4b265..74280c1 100644
--- a/debian/patches/help2man.patch
+++ b/debian/patches/help2man.patch
@@ -4,10 +4,10 @@ Bug-Debian: https://bugs.debian.org/1030194
 Forwarded: not-needed
 Last-Update: 2023-02-01
 
-Index: abi-dumper/abi-dumper.pl
+Index: abi-dumper.git/abi-dumper.pl
 ===================================================================
---- abi-dumper.orig/abi-dumper.pl
-+++ abi-dumper/abi-dumper.pl
+--- abi-dumper.git.orig/abi-dumper.pl
++++ abi-dumper.git/abi-dumper.pl
 @@ -180,6 +180,7 @@ USAGE:
  
  EXAMPLES:
diff --git a/debian/patches/series b/debian/patches/series
index f2d326a..e1f0a0b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 typo.patch
-bug1020818.patch
 help2man.patch
diff --git a/debian/patches/typo.patch b/debian/patches/typo.patch
index 146a0b7..1d43350 100644
--- a/debian/patches/typo.patch
+++ b/debian/patches/typo.patch
@@ -3,10 +3,10 @@ Author: Mathieu Malaterre <malat@debian.org>
 Bug-Debian: https://bugs.debian.org/825052
 Forwarded: no
 
-Index: abi-dumper/abi-dumper.pl
+Index: abi-dumper.git/abi-dumper.pl
 ===================================================================
---- abi-dumper.orig/abi-dumper.pl
-+++ abi-dumper/abi-dumper.pl
+--- abi-dumper.git.orig/abi-dumper.pl
++++ abi-dumper.git/abi-dumper.pl
 @@ -251,7 +251,7 @@ GENERAL OPTIONS:
    
    -public-headers PATH

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details