]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debuginfod: fix skipping <built-in> source file
authorOmar Sandoval <osandov@fb.com>
Fri, 19 Jul 2024 18:24:32 +0000 (11:24 -0700)
committerAaron Merey <amerey@redhat.com>
Tue, 23 Jul 2024 20:20:01 +0000 (16:20 -0400)
commit1bf1036ffd22656f7b3050c931a87a969735941c
tree5df694dc3947e25555964c1ffd75f79f76caa361
parent27a64ef36a09a489c0e70e8c6bc1a2783ea1d714
debuginfod: fix skipping <built-in> source file

dwarf_extract_source_paths explicitly skips source files that equal
"<built-in>", but dwarf_filesrc may return a path like "dir/<built-in>".
Check for and skip that case, too.

In particular, the test debuginfod RPMs have paths like this.  However,
the test cases didn't catch this because they have a bug, too: they
follow symlinks, which results in double-counting every file.  Fix that,
too.

Signed-off-by: Omar Sandoval <osandov@fb.com>
debuginfod/debuginfod.cxx
tests/run-debuginfod-archive-groom.sh
tests/run-debuginfod-extraction.sh