Bug 30309 - Support absolute path to alt debug info file in DWARF
authorDodji Seketeli <dodji@redhat.com>
Tue, 25 Apr 2023 10:17:12 +0000 (12:17 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 25 Apr 2023 13:50:26 +0000 (15:50 +0200)
Until now, the path to the alternate DWARF file, given by the content
of the .gnu_debugaltlink section has generally been a relative path.
That is what the elf reader has grown to expect.

In bug https://sourceware.org/bugzilla/show_bug.cgi?id=30329 the
.gnu_debugaltlink section seems an absolute path:
'/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu'.

The elf-reader thus fails to find the alternate DWARF file as it's
looking for a relative path under the debug info root directory.

This path teaches the elf-reader to handle absolute alternate
debuginfo files too.

* src/abg-elf-reader.cc (find_alt_dwarf_debug_info_path): Trim the
"/usr/lib/debug" prefix from the alt dwarf file path, if it was
provided.  The function is going to look for the alt dwarf file
under the debug info root file instead.
* src/abg-tools-utils.cc (entry_of_file_with_name): Add a
parameter for the path to the root directory under which the files
visit is taking place.  Then, consider the file path being looked
for as being relative to the root directory under which the files
visit is taking place.
* tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu:
New test input.
* tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug:
Likewise.
* tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6:
Likewise.
* tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu:
Likewise.
* tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug:
Likewise.
* tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6:
Likewise.
* tests/data/test-abidiff-exit/PR30329/PR30329-report-1.txt:
Likewise.
* tests/data/Makefile.am: Add the new test material above to
source distribution.
* tests/test-abidiff-exit.cc (InOutSpec::in_elfv{0,1}_debug_dir):
New data members.  Carry the debuginfo root dirs for the input
binaries.
(in_out_specs): Update the existing to adjust for the new
InOutSpec::in_elfv{0,1}_debug_dir data members.  Also, add a new
entry for this new test case.
(main): Pass the root debug info dirs to abidiff.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-elf-reader.cc
src/abg-tools-utils.cc
tests/data/Makefile.am
tests/data/test-abidiff-exit/PR30329/PR30329-report-1.txt [new file with mode: 0644]
tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu [new file with mode: 0644]
tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug [new file with mode: 0644]
tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 [new file with mode: 0755]
tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu [new file with mode: 0644]
tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug [new file with mode: 0644]
tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 [new file with mode: 0755]
tests/test-abidiff-exit.cc

index 101df0dc07832ba23b2a85cf4dab42cc99e22332..af65cecfbfd1e3710793e26569c873976a5d2129 100644 (file)
@@ -132,6 +132,11 @@ find_alt_dwarf_debug_info_path(const vector<char**> root_dirs,
     return false;
 
   string altfile_name = tools_utils::trim_leading_string(alt_file_name, "../");
+  // In case the alt dwarf debug info file is to be found under
+  // "/usr/lib/debug", look for it under the provided root directories
+  // instead.
+  altfile_name = tools_utils::trim_leading_string(altfile_name,
+                                                 "/usr/lib/debug/");
 
   for (vector<char**>::const_iterator i = root_dirs.begin();
        i != root_dirs.end();
index 03cb88f9937ecfdda185e1f7b6b5f315e633d776..4f6fd9984f6e506cd266608bc2ec8a1cd57aba2c 100644 (file)
@@ -2302,13 +2302,20 @@ load_default_user_suppressions(suppr::suppressions_type& supprs)
 ///
 /// @param entry the FTSENT* to consider.
 ///
-/// @param fname the file name (or end of path) to consider.
+/// @param fname the file name (or end of path) to consider.  The file
+/// name can also be a path that is relative to the root directory the
+/// current visit is started from.  The root directory is given by @p
+/// root_dir.
+///
+/// @param root_dir the root dir from which the directory visit is
+/// being performed.
 ///
 /// @return true iff @p entry denotes a file which path ends with @p
 /// fname.
 static bool
 entry_of_file_with_name(const FTSENT *entry,
-                       const string& fname)
+                       const string& fname,
+                       const string& root_dir)
 {
   if (entry == NULL
       || (entry->fts_info != FTS_F && entry->fts_info != FTS_SL)
@@ -2319,6 +2326,11 @@ entry_of_file_with_name(const FTSENT *entry,
   string fpath = ::basename(entry->fts_path);
   if (fpath == fname)
     return true;
+
+  fpath = trim_leading_string(entry->fts_path, root_dir);
+  if (fpath == fname)
+    return true;
+
   return false;
 }
 
@@ -2344,6 +2356,10 @@ find_file_under_dir(const string& root_dir,
   if (!file_hierarchy)
     return false;
 
+  string r = root_dir;
+  if (!string_ends_with(r, "/"))
+    r += "/";
+
   FTSENT *entry;
   while ((entry = fts_read(file_hierarchy)))
     {
@@ -2353,7 +2369,7 @@ find_file_under_dir(const string& root_dir,
          fts_set(file_hierarchy, entry, FTS_SKIP);
          continue;
        }
-      if (entry_of_file_with_name(entry, file_path_to_look_for))
+      if (entry_of_file_with_name(entry, file_path_to_look_for, r))
        {
          result = entry->fts_path;
          return true;
index 6aab630b2f67ab71ec0f5de7a12876681f82c7ed..81948b195916a9bf32090e3d153215b98a3243e7 100644 (file)
@@ -314,6 +314,12 @@ test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o \
 test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.adb \
 test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.ads \
 test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.o \
+test-abidiff-exit/PR30329/new-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu \
+test-abidiff-exit/PR30329/new-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug \
+test-abidiff-exit/PR30329/new-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 \
+test-abidiff-exit/PR30329/old-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu \
+test-abidiff-exit/PR30329/old-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug \
+test-abidiff-exit/PR30329/old-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 \
 \
 test-diff-dwarf/test0-v0.cc            \
 test-diff-dwarf/test0-v0.o                     \
diff --git a/tests/data/test-abidiff-exit/PR30329/PR30329-report-1.txt b/tests/data/test-abidiff-exit/PR30329/PR30329-report-1.txt
new file mode 100644 (file)
index 0000000..e5e4006
--- /dev/null
@@ -0,0 +1,170 @@
+Functions changes summary: 0 Removed, 1 Changed (145 filtered out), 1 Added functions
+Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
+
+1 Added function:
+
+  [A] 'function int sqlite3_value_encoding(sqlite3_value*)'    {sqlite3_value_encoding}
+
+1 function with some indirect sub-type change:
+
+  [C] 'function void* sqlite3_aggregate_context(sqlite3_context*, int)' at sqlite3.c:86987:1 has some indirect sub-type changes:
+    parameter 1 of type 'sqlite3_context*' has sub-type changes:
+      in pointed to type 'typedef sqlite3_context' at sqlite3.c:4730:1:
+        underlying type 'struct sqlite3_context' at sqlite3.c:22549:1 changed:
+          type size hasn't changed
+          1 data member changes (4 filtered):
+            type of 'Mem* pOut' changed:
+              in pointed to type 'typedef Mem' at sqlite3.c:15805:1:
+                underlying type 'struct sqlite3_value' at sqlite3.c:22387:1 changed:
+                  type size hasn't changed
+                  1 data member changes (1 filtered):
+                    type of 'sqlite3* db' changed:
+                      in pointed to type 'typedef sqlite3' at sqlite3.c:578:1:
+                        underlying type 'struct sqlite3' at sqlite3.c:16840:1 changed:
+                          type size changed from 6464 to 6528 (in bits)
+                          29 data member changes (6 filtered):
+                            type of 'Vdbe* pVdbe' changed:
+                              in pointed to type 'struct Vdbe' at sqlite3.c:22731:1:
+                                type size hasn't changed
+                                3 data member changes (11 filtered):
+                                  type of 'Vdbe* pPrev' changed:
+                                    in pointed to type 'typedef Vdbe':
+                                      entity changed from 'typedef Vdbe' to 'Vdbe*'
+                                      type size changed from 2432 to 64 (in bits)
+                                  and name of 'Vdbe::pPrev' changed to 'Vdbe::ppVPrev' at sqlite3.c:22733:1
+                                  name of 'Vdbe::pNext' changed to 'Vdbe::pVNext' at sqlite3.c:22733:1
+                                  type of 'Parse* pParse' changed:
+                                    in pointed to type 'typedef Parse' at sqlite3.c:14707:1:
+                                      underlying type 'struct Parse' at sqlite3.c:18897:1 changed:
+                                        type size changed from 3264 to 3328 (in bits)
+                                        1 data member insertion:
+                                          'IndexedExpr* pIdxExpr', at offset 768 (in bits) at sqlite3.c:19060:1
+                                        45 data member changes (3 filtered):
+                                          type of 'ExprList* pConstExpr' changed:
+                                            in pointed to type 'typedef ExprList' at sqlite3.c:14691:1:
+                                              underlying type 'struct ExprList' at sqlite3.c:18309:1 changed:
+                                                type size hasn't changed
+                                                1 data member change:
+                                                  type of 'ExprList_item a[1]' changed:
+                                                    array element type 'struct ExprList_item' changed:
+                                                      type size hasn't changed
+                                                      1 data member change:
+                                                        type of 'Expr* pExpr' changed:
+                                                          in pointed to type 'typedef Expr' at sqlite3.c:14690:1:
+                                                            underlying type 'struct Expr' at sqlite3.c:18113:1 changed:
+                                                              type size hasn't changed
+                                                              1 data member changes (4 filtered):
+                                                                type of 'union {ExprList* pList; Select* pSelect;} x' changed:
+                                                                  type size hasn't changed
+                                                                  1 data member changes (1 filtered):
+                                                                    type of 'Select* pSelect' changed:
+                                                                      in pointed to type 'typedef Select' at sqlite3.c:14715:1:
+                                                                        underlying type 'struct Select' at sqlite3.c:18636:1 changed:
+                                                                          type size hasn't changed
+                                                                          1 data member changes (11 filtered):
+                                                                            type of 'SrcList* pSrc' changed:
+                                                                              in pointed to type 'typedef SrcList' at sqlite3.c:14719:1:
+                                                                                underlying type 'struct SrcList' at sqlite3.c:18462:1 changed:
+                                                                                  type size hasn't changed
+                                                                                  1 data member change:
+                                                                                    type of 'SrcItem a[1]' changed:
+                                                                                      array element type 'typedef SrcItem' changed:
+                                                                                        underlying type 'struct SrcItem' at sqlite3.c:18391:1 changed:
+                                                                                          type size hasn't changed
+                                                                                          1 data member changes (5 filtered):
+                                                                                            type of 'Schema* pSchema' changed:
+                                                                                              in pointed to type 'typedef Schema' at sqlite3.c:14689:1:
+                                                                                                underlying type 'struct Schema' at sqlite3.c:16646:1 changed:
+                                                                                                  type size hasn't changed
+                                                                                                  1 data member change:
+                                                                                                    type of 'Table* pSeqTab' changed:
+                                                                                                      in pointed to type 'typedef Table' at sqlite3.c:14721:1:
+                                                                                                        underlying type 'struct Table' at sqlite3.c:17574:1 changed:
+                                                                                                          type size hasn't changed
+                                                                                                          1 data member changes (4 filtered):
+                                                                                                            type of 'Index* pIndex' changed:
+                                                                                                              in pointed to type 'typedef Index' at sqlite3.c:14697:1:
+                                                                                                                underlying type 'struct Index' at sqlite3.c:17896:1 changed:
+                                                                                                                  type size hasn't changed
+                                                                                                                  1 data member insertion:
+                                                                                                                    'unsigned int bHasExpr', at offset 803 (in bits) at sqlite3.c:18035:1
+                                                                                                                  no data member changes (5 filtered);
+                                                                                      type size hasn't changed
+                                                    type size hasn't changed
+                                          'Token constraintName' offset changed from 768 to 832 (in bits) (by +64 bits)
+                                          'yDbMask writeMask' offset changed from 896 to 960 (in bits) (by +64 bits)
+                                          'yDbMask cookieMask' offset changed from 928 to 992 (in bits) (by +64 bits)
+                                          'int regRowid' offset changed from 960 to 1024 (in bits) (by +64 bits)
+                                          'int regRoot' offset changed from 992 to 1056 (in bits) (by +64 bits)
+                                          'int nMaxArg' offset changed from 1024 to 1088 (in bits) (by +64 bits)
+                                          'int nSelect' offset changed from 1056 to 1120 (in bits) (by +64 bits)
+                                          'int nTableLock' offset changed from 1088 to 1152 (in bits) (by +64 bits)
+                                          'TableLock* aTableLock' offset changed from 1152 to 1216 (in bits) (by +64 bits)
+                                          'AutoincInfo* pAinc' offset changed from 1216 to 1280 (in bits) (by +64 bits)
+                                          'Parse* pToplevel' offset changed from 1280 to 1344 (in bits) (by +64 bits)
+                                          'Table* pTriggerTab' offset changed from 1344 to 1408 (in bits) (by +64 bits)
+                                          'TriggerPrg* pTriggerPrg' offset changed from 1408 to 1472 (in bits) (by +64 bits)
+                                          'ParseCleanup* pCleanup' offset changed from 1472 to 1536 (in bits) (by +64 bits)
+                                          'union {int addrCrTab; Returning* pReturning;} u1' offset changed from 1536 to 1600 (in bits) (by +64 bits)
+                                          'u32 nQueryLoop' offset changed from 1600 to 1664 (in bits) (by +64 bits)
+                                          'u32 oldmask' offset changed from 1632 to 1696 (in bits) (by +64 bits)
+                                          'u32 newmask' offset changed from 1664 to 1728 (in bits) (by +64 bits)
+                                          'u8 eTriggerOp' offset changed from 1696 to 1760 (in bits) (by +64 bits)
+                                          'u8 bReturning' offset changed from 1704 to 1768 (in bits) (by +64 bits)
+                                          'u8 eOrconf' offset changed from 1712 to 1776 (in bits) (by +64 bits)
+                                          'u8 disableTriggers' offset changed from 1720 to 1784 (in bits) (by +64 bits)
+                                          'int aTempReg[8]' offset changed from 1728 to 1792 (in bits) (by +64 bits)
+                                          'Parse* pOuterParse' offset changed from 1984 to 2048 (in bits) (by +64 bits)
+                                          'Token sNameToken' offset changed from 2048 to 2112 (in bits) (by +64 bits)
+                                          'Token sLastToken' offset changed from 2176 to 2240 (in bits) (by +64 bits)
+                                          'ynVar nVar' offset changed from 2304 to 2368 (in bits) (by +64 bits)
+                                          'u8 iPkSortOrder' offset changed from 2320 to 2384 (in bits) (by +64 bits)
+                                          'u8 explain' offset changed from 2328 to 2392 (in bits) (by +64 bits)
+                                          'u8 eParseMode' offset changed from 2336 to 2400 (in bits) (by +64 bits)
+                                          'int nVtabLock' offset changed from 2368 to 2432 (in bits) (by +64 bits)
+                                          'int nHeight' offset changed from 2400 to 2464 (in bits) (by +64 bits)
+                                          'int addrExplain' offset changed from 2432 to 2496 (in bits) (by +64 bits)
+                                          'VList* pVList' offset changed from 2496 to 2560 (in bits) (by +64 bits)
+                                          'Vdbe* pReprepare' offset changed from 2560 to 2624 (in bits) (by +64 bits)
+                                          'const char* zTail' offset changed from 2624 to 2688 (in bits) (by +64 bits)
+                                          'Table* pNewTable' offset changed from 2688 to 2752 (in bits) (by +64 bits)
+                                          'Index* pNewIndex' offset changed from 2752 to 2816 (in bits) (by +64 bits)
+                                          'Trigger* pNewTrigger' offset changed from 2816 to 2880 (in bits) (by +64 bits)
+                                          'const char* zAuthContext' offset changed from 2880 to 2944 (in bits) (by +64 bits)
+                                          'Token sArg' offset changed from 2944 to 3008 (in bits) (by +64 bits)
+                                          'Table** apVtabLock' offset changed from 3072 to 3136 (in bits) (by +64 bits)
+                                          'With* pWith' offset changed from 3136 to 3200 (in bits) (by +64 bits)
+                                          'RenameToken* pRename' offset changed from 3200 to 3264 (in bits) (by +64 bits)
+                            type of 'Lookaside lookaside' changed:
+                              underlying type 'struct Lookaside' at sqlite3.c:16734:1 changed:
+                                type size changed from 704 to 768 (in bits)
+                                1 data member insertion:
+                                  'void* pTrueEnd', at offset 704 (in bits) at sqlite3.c:16849:1
+                            'sqlite3_xauth xAuth' offset changed from 3968 to 4032 (in bits) (by +64 bits)
+                            'void* pAuthArg' offset changed from 4032 to 4096 (in bits) (by +64 bits)
+                            'int (void*)* xProgress' offset changed from 4096 to 4160 (in bits) (by +64 bits)
+                            'void* pProgressArg' offset changed from 4160 to 4224 (in bits) (by +64 bits)
+                            'unsigned int nProgressOps' offset changed from 4224 to 4288 (in bits) (by +64 bits)
+                            'int nVTrans' offset changed from 4256 to 4320 (in bits) (by +64 bits)
+                            'Hash aModule' offset changed from 4288 to 4352 (in bits) (by +64 bits)
+                            'VtabCtx* pVtabCtx' offset changed from 4480 to 4544 (in bits) (by +64 bits)
+                            'VTable** aVTrans' offset changed from 4544 to 4608 (in bits) (by +64 bits)
+                            'VTable* pDisconnect' offset changed from 4608 to 4672 (in bits) (by +64 bits)
+                            'Hash aFunc' offset changed from 4672 to 4736 (in bits) (by +64 bits)
+                            'Hash aCollSeq' offset changed from 4864 to 4928 (in bits) (by +64 bits)
+                            'BusyHandler busyHandler' offset changed from 5056 to 5120 (in bits) (by +64 bits)
+                            'Db aDbStatic[2]' offset changed from 5248 to 5312 (in bits) (by +64 bits)
+                            'Savepoint* pSavepoint' offset changed from 5760 to 5824 (in bits) (by +64 bits)
+                            'int nAnalysisLimit' offset changed from 5824 to 5888 (in bits) (by +64 bits)
+                            'int busyTimeout' offset changed from 5856 to 5920 (in bits) (by +64 bits)
+                            'int nSavepoint' offset changed from 5888 to 5952 (in bits) (by +64 bits)
+                            'int nStatement' offset changed from 5920 to 5984 (in bits) (by +64 bits)
+                            'i64 nDeferredCons' offset changed from 5952 to 6016 (in bits) (by +64 bits)
+                            'i64 nDeferredImmCons' offset changed from 6016 to 6080 (in bits) (by +64 bits)
+                            'int* pnBytesFreed' offset changed from 6080 to 6144 (in bits) (by +64 bits)
+                            'sqlite3* pBlockingConnection' offset changed from 6144 to 6208 (in bits) (by +64 bits)
+                            'sqlite3* pUnlockConnection' offset changed from 6208 to 6272 (in bits) (by +64 bits)
+                            'void* pUnlockArg' offset changed from 6272 to 6336 (in bits) (by +64 bits)
+                            'void (void**, int)* xUnlockNotify' offset changed from 6336 to 6400 (in bits) (by +64 bits)
+                            'sqlite3* pNextBlocked' offset changed from 6400 to 6464 (in bits) (by +64 bits)
+
diff --git a/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu b/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu
new file mode 100644 (file)
index 0000000..edebb7d
Binary files /dev/null and b/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu differ
diff --git a/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug b/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug
new file mode 100644 (file)
index 0000000..3260ea0
Binary files /dev/null and b/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug differ
diff --git a/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 b/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
new file mode 100755 (executable)
index 0000000..fcb1c0e
Binary files /dev/null and b/tests/data/test-abidiff-exit/PR30329/new-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 differ
diff --git a/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu b/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu
new file mode 100644 (file)
index 0000000..2fcd8f1
Binary files /dev/null and b/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/dwz/components/sqlite.bst/x86_64-unknown-linux-gnu differ
diff --git a/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug b/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug
new file mode 100644 (file)
index 0000000..18f443c
Binary files /dev/null and b/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/debug/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6.debug differ
diff --git a/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 b/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
new file mode 100755 (executable)
index 0000000..dc761da
Binary files /dev/null and b/tests/data/test-abidiff-exit/PR30329/old-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 differ
index 3733dce91a5bba6ab31d80262926542049a16aa9..dafd003621caf186b8036b0e1b16ba0e2c96d883 100644 (file)
@@ -37,6 +37,8 @@ struct InOutSpec
   const char*  in_suppr_path;
   const char*   in_elfv0_headers_dirs;
   const char*   in_elfv1_headers_dirs;
+  const char*   in_elfv0_debug_dir;
+  const char*   in_elfv1_debug_dir;
   const char*  abidiff_options;
   abidiff_status status;
   const char*  in_report_path;
@@ -51,6 +53,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE
     | abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE,
@@ -63,6 +67,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test1-voffset-change.abignore",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test1-voffset-change-report1.txt",
@@ -74,6 +80,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE
     | abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE,
@@ -86,6 +94,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test2-filtered-removed-fns.abignore",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test2-filtered-removed-fns-report1.txt",
@@ -98,6 +108,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-loc-with-locs-report.txt",
     "output/test-abidiff-exit/test-loc-with-locs-report.txt"
@@ -108,6 +120,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-show-locs",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-loc-without-locs-report.txt",
@@ -119,6 +133,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-no-stray-comma-report.txt",
@@ -130,6 +146,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-show-locs --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-leaf-stats-report.txt",
@@ -141,6 +159,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-show-locs --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE
     | abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE,
@@ -153,6 +173,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-show-locs --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-leaf-fun-type-report.txt",
@@ -164,6 +186,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-leaf-redundant-report.txt",
@@ -175,6 +199,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-leaf-peeling-report.txt",
@@ -186,6 +212,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE
     | abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE,
@@ -199,6 +227,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-member-size-report0.txt",
     "output/test-abidiff-exit/test-member-size-report0.txt"
@@ -209,6 +239,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-member-size-report1.txt",
@@ -220,6 +252,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--harmless",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-decl-struct-report.txt",
@@ -232,6 +266,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-fun-param-report.txt",
     "output/test-abidiff-exit/test-fun-param-report.txt"
@@ -242,6 +278,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--harmless",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-decl-enum-report.txt",
@@ -254,6 +292,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-decl-enum-report-2.txt",
     "output/test-abidiff-exit/test-decl-enum-report-2.txt"
@@ -264,6 +304,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-decl-enum-report-3.txt",
@@ -275,6 +317,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE
     | abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE,
@@ -287,6 +331,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-net-change.abignore",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-net-change-report1.txt",
@@ -298,6 +344,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE
     | abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE,
@@ -310,6 +358,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-net-change.abignore",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --no-show-locs --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-net-change-report3.txt",
@@ -321,6 +371,8 @@ InOutSpec in_out_specs[] =
     "",
     "data/test-abidiff-exit/test-headers-dirs/headers-a",
     "data/test-abidiff-exit/test-headers-dirs/headers-a",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-headers-dirs/test-headers-dir-report-1.txt",
@@ -334,6 +386,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-headers-dirs/headers-b",
     "data/test-abidiff-exit/test-headers-dirs/headers-a, "
     "data/test-abidiff-exit/test-headers-dirs/headers-b",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-headers-dirs/test-headers-dir-report-2.txt",
@@ -346,6 +400,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/qualifier-typedef-array-report-0.txt",
     "output/test-abidiff-exit/qualifier-typedef-array-report-0.txt"
@@ -356,6 +412,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--harmless",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/qualifier-typedef-array-report-1.txt",
@@ -367,6 +425,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/qualifier-typedef-array-report-2.txt",
@@ -378,6 +438,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--harmless --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/qualifier-typedef-array-report-3.txt",
@@ -389,6 +451,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-non-leaf-array-report.txt",
@@ -401,6 +465,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-crc-report.txt",
     "output/test-abidiff-exit/test-crc-report.txt"
@@ -412,6 +478,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-missing-alias-report.txt",
     "output/test-abidiff-exit/test-missing-alias-report.txt"
@@ -422,6 +490,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --harmless",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-PR28316-report.txt",
@@ -433,6 +503,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --harmless",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-PR29144-report.txt",
@@ -444,6 +516,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--leaf-changes-only --no-default-suppression --harmless",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-PR29144-report-2.txt",
@@ -455,6 +529,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-ld-2.28-210.so--ld-2.28-211.so.txt",
@@ -466,6 +542,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-rhbz2114909-report-1.txt",
@@ -477,6 +555,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/PR30048-test-report-0.txt",
@@ -488,6 +568,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/PR30048-test-2-report-1.txt",
@@ -499,6 +581,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-array-v0--v1-report-1.txt",
@@ -510,6 +594,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-array-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-allow-type-array-v0--v1-report-2.txt",
@@ -521,6 +607,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-array-v0--v2-report-1.txt",
@@ -532,6 +620,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-array-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-array-v0--v2-report-2.txt",
@@ -543,6 +633,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-array-v0--v3-report-1.txt",
@@ -554,6 +646,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-array-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-allow-type-array-v0--v3-report-2.txt",
@@ -565,6 +659,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v1-report-1.txt",
@@ -576,6 +672,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-region-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-allow-type-region-v0--v1-report-2.txt",
@@ -587,6 +685,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v2-report-1.txt",
@@ -598,6 +698,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v2-report-1.txt",
@@ -609,6 +711,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-region-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v2-report-2.txt",
@@ -620,6 +724,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v3-report-1.txt",
@@ -631,6 +737,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-region-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v3-report-2.txt",
@@ -642,6 +750,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v4-report-1.txt",
@@ -653,6 +763,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-region-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_OK,
     "data/test-abidiff-exit/test-allow-type-region-v0--v4-report-2.txt",
@@ -664,6 +776,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v5-report-1.txt",
@@ -675,6 +789,8 @@ InOutSpec in_out_specs[] =
     "data/test-abidiff-exit/test-allow-type-region-suppr.txt",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/test-allow-type-region-v0--v5-report-2.txt",
@@ -686,6 +802,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-1.txt",
@@ -697,6 +815,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/ada-subrange/test1-ada-subrange/test1-ada-subrange-report-2.txt",
@@ -708,22 +828,39 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt",
     "output/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-1.txt"
   },
-    {
+  {
     "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v0/test.o",
     "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/v1/test.o",
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --leaf-changes-only",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt",
     "output/test-abidiff-exit/ada-subrange/test2-ada-subrange-redundant/test2-ada-subrange-redundant-report-2.txt"
   },
+  {
+    "data/test-abidiff-exit/PR30329/old-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6",
+    "data/test-abidiff-exit/PR30329/new-image/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6",
+    "",
+    "",
+    "",
+    "data/test-abidiff-exit/PR30329/old-image/usr/lib/debug",
+    "data/test-abidiff-exit/PR30329/new-image/usr/lib/debug",
+    "--no-default-suppression",
+    abigail::tools_utils::ABIDIFF_ABI_CHANGE,
+    "data/test-abidiff-exit/PR30329/PR30329-report-1.txt",
+    "output/test-abidiff-exit/PR30329/PR30329-report-1.txt"
+  },
 #ifdef WITH_BTF
   {
     "data/test-abidiff-exit/btf/test0-v0.o",
@@ -731,6 +868,8 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --btf",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/btf/test0-report-1.txt",
@@ -742,13 +881,15 @@ InOutSpec in_out_specs[] =
     "",
     "",
     "",
+    "",
+    "",
     "--no-default-suppression --harmless --btf",
     abigail::tools_utils::ABIDIFF_ABI_CHANGE,
     "data/test-abidiff-exit/btf/test0-report-2.txt",
     "output/test-abidiff-exit/btf/test0-report-2.txt"
   },
 #endif
-  {0, 0, 0 ,0, 0, 0, abigail::tools_utils::ABIDIFF_OK, 0, 0}
+  {0, 0, 0 ,0, 0, 0, 0, 0, abigail::tools_utils::ABIDIFF_OK, 0, 0}
 };
 
 /// Prefix the strings in a vector of string.
@@ -780,7 +921,8 @@ main()
 
   string in_elfv0_path, in_elfv1_path,
     in_suppression_path, abidiff_options, abidiff, cmd, diff_cmd,
-    ref_diff_report_path, out_diff_report_path;
+    ref_diff_report_path, out_diff_report_path, in_elfv0_debug_dir,
+    in_elfv1_debug_dir;
   vector<string> in_elfv0_headers_dirs, in_elfv1_headers_dirs;
   string source_dir_prefix = string(get_src_dir()) + "/tests/";
   string build_dir_prefix = string(get_build_dir()) + "/tests/";
@@ -790,6 +932,8 @@ main()
        bool is_ok = true;
        in_elfv0_path = source_dir_prefix + s->in_elfv0_path;
        in_elfv1_path = source_dir_prefix + s->in_elfv1_path;
+       in_elfv0_debug_dir = source_dir_prefix + s->in_elfv0_debug_dir;
+       in_elfv1_debug_dir = source_dir_prefix + s->in_elfv1_debug_dir;
        split_string(s->in_elfv0_headers_dirs, ",", in_elfv0_headers_dirs);
        split_string(s->in_elfv1_headers_dirs, ",", in_elfv1_headers_dirs);
        do_prefix_strings(in_elfv0_headers_dirs, source_dir_prefix);
@@ -807,7 +951,8 @@ main()
        if (!ensure_parent_dir_created(out_diff_report_path))
          {
            cerr << "could not create parent directory for "
-                << out_diff_report_path;
+                << out_diff_report_path
+                << "\n";
            is_ok = false;
            continue;
          }
@@ -816,6 +961,12 @@ main()
        if (!abidiff_options.empty())
          abidiff += " " + abidiff_options;
 
+       if (!in_elfv0_debug_dir.empty())
+         abidiff += " --debug-info-dir1 " + in_elfv0_debug_dir;
+
+       if (!in_elfv1_debug_dir.empty())
+         abidiff += " --debug-info-dir2 " + in_elfv1_debug_dir;
+
        if (!in_elfv0_headers_dirs.empty())
          for (vector<string>::const_iterator s = in_elfv0_headers_dirs.begin();
               s != in_elfv0_headers_dirs.end();