diff options
author | Martin Liska <mliska@suse.cz> | 2022-08-17 09:11:10 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-08-17 13:50:07 +0200 |
commit | 9db6b94541623ad9e76cb3c84e132a110b54b0f7 (patch) | |
tree | 83290dca59ca7a7bc343e1c225cd01e57569b85e /debuginfod/debuginfod.cxx | |
parent | 538f0c744dd4e1d931b98d01425b45137afcd9a4 (diff) | |
download | elfutils-9db6b94541623ad9e76cb3c84e132a110b54b0f7.tar.gz |
debuginfod: print filename for "cannot open archive" error
Report the file that has such a problem so that one can inspect it.
Signed-off-by: Martin Liska <mliska@suse.cz>
Diffstat (limited to 'debuginfod/debuginfod.cxx')
-rw-r--r-- | debuginfod/debuginfod.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 9245be53..366a4a09 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -1714,7 +1714,10 @@ handle_buildid_r_match (bool internal_req_p, rc = archive_read_open_FILE (a, fp); if (rc != ARCHIVE_OK) - throw archive_exception(a, "cannot open archive from pipe"); + { + obatched(clog) << "cannot open archive from pipe " << b_source0 << endl; + throw archive_exception(a, "cannot open archive from pipe"); + } // archive traversal is in three stages, no, four stages: // 1) skip entries whose names do not match the requested one @@ -2973,7 +2976,10 @@ archive_classify (const string& rps, string& archive_extension, rc = archive_read_open_FILE (a, fp); if (rc != ARCHIVE_OK) - throw archive_exception(a, "cannot open archive from pipe"); + { + obatched(clog) << "cannot open archive from pipe " << rps << endl; + throw archive_exception(a, "cannot open archive from pipe"); + } if (verbose > 3) obatched(clog) << "libarchive scanning " << rps << endl; |