public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug debuginfod/25548] New: also support canonicalized source-file name lookups in webapi
@ 2020-02-13 15:02 fche at redhat dot com
  2020-02-13 15:19 ` [Bug debuginfod/25548] " jan.kratochvil at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fche at redhat dot com @ 2020-02-13 15:02 UTC (permalink / raw)
  To: elfutils-devel

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-26 14:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 15:02 [Bug debuginfod/25548] New: also support canonicalized source-file name lookups in webapi fche at redhat dot com
2020-02-13 15:19 ` [Bug debuginfod/25548] " jan.kratochvil at redhat dot com
2020-02-13 17:20 ` kkleine at redhat dot com
2020-02-14 12:21 ` labath at google dot com
2020-03-01 19:47 ` fche at redhat dot com
2020-03-25  2:13 ` fche at redhat dot com
2020-03-26 14:44 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).