https://sourceware.org/bugzilla/show_bug.cgi?id=25548
Bug ID: 25548 Summary: also support canonicalized source-file name lookups in webapi Product: elfutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: fche at redhat dot com CC: elfutils-devel at sourceware dot org, jan.kratochvil at redhat dot com, kkleine at redhat dot com Target Milestone: --- It turns out that some debuginfo consumers canonicalize source-code file names by the time they get the convenient chance to fall back to debuginfod. This means that path substrings that POSIX defines as no-ops are lost. debuginfod should extend a gracious embrace to these tools by also permitting such paths to be used during the /buildid/hexcode/source/PATH webapi. Implementing this should not be too hard. The dwarf_extract_source_paths could add both waldo and a new canonicalize_posix_path(waldo) to the returned debug_sourcefiles[] set. That's it. The canonicalize_posix_path() function would perform these textual rewrites, repeating until convergence: /./ -> / /FOO/../ -> / # NB: FOO must not be . or .. because /../../ != / // -> / (realpath(3) is not helpful because it looks at the host filesystem to do resolution, which we cannot when dealing with archive-resident file names.) -- You are receiving this mail because: You are on the CC list for the bug.