summaryrefslogtreecommitdiffstats
path: root/debuginfod
diff options
context:
space:
mode:
authorOmar Sandoval <[email protected]>2024-07-23 15:35:37 -0700
committerAaron Merey <[email protected]>2024-07-24 18:13:40 -0400
commit64186d7548db976caffa9d2ba210eed66cdc808f (patch)
treedbba025ded2af2788bd4982cc7a4b1bc8a8c17d6 /debuginfod
parenta49d5c0e6dee7026c54699f6024ecd0a22a9aa5b (diff)
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 <[email protected]>
Diffstat (limited to 'debuginfod')
-rw-r--r--debuginfod/debuginfod.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 305edde8..92022f3d 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -3446,7 +3446,8 @@ dwarf_extract_source_paths (Elf *elf, set<string>& debug_sourcefiles)
if (hat == NULL)
continue;
- if (string(hat) == "<built-in>") // gcc intrinsics, don't bother record
+ if (string(hat) == "<built-in>"
+ || string_endswith(hat, "<built-in>")) // gcc intrinsics, don't bother record
continue;
string waldo;