Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-19 Thread Mark Wielaard
Hi Roland, On Wed, 2023-06-14 at 12:43 -0700, Roland McGrath wrote: > Personally I'm not concerned with any non-build-ID use cases any more. > I don't know if the rest of the world is OK with presuming that build > ID-based lookup is always the only thing you want nowadays. > But it seems plausibl

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-14 Thread Roland McGrath via Elfutils-devel
Personally I'm not concerned with any non-build-ID use cases any more. I don't know if the rest of the world is OK with presuming that build ID-based lookup is always the only thing you want nowadays. But it seems plausible, since we rolled out Build ID in 2008 and it's been pretty thoroughly adop

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-14 Thread Mark Wielaard
Hi Roland, On Wed, 2023-05-31 at 16:44 -0700, Roland McGrath via Elfutils-devel wrote: > In elfutils, the libdwfl library is responsible for the "library for > obtaining debug info writ large" stuff. It provides API parsers > for command-line arguments that mesh with its library stuff like > Dwfl

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-01 Thread Daniel Thornburgh via Elfutils-devel
SGTM; I'll see if I can write a patch to do this when I get some spare cycles. On Thu, Jun 1, 2023 at 2:21 PM Frank Ch. Eigler wrote: > Hi - > > > Hmm, how would the effective behavior of this differ from directly > > returning the path? The symlink could become invalid at any time [...] > > Eff

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Hmm, how would the effective behavior of this differ from directly > returning the path? The symlink could become invalid at any time [...] Effective behaviour is about the same, but code logic and explanation is simpler. > It would make sense if the cache were made to contain a hard link

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-01 Thread Daniel Thornburgh via Elfutils-devel
Hmm, how would the effective behavior of this differ from directly returning the path? The symlink could become invalid at any time, and it would become invalid in precisely the same scenarios that the original file would. A further request would in both cases stat the original file, and if it were

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-06-01 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > So I guess, sans the format, the feature request would just be that > it would have a shortcut for file URLs to produce the path directly > in response to e.g. a debuginfod_find_debuginfo, rather than making > a copy of the file via libcurl. A compromise solution could be for new code to p

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-05-31 Thread Roland McGrath via Elfutils-devel
In elfutils, the libdwfl library is responsible for the "library for obtaining debug info writ large" stuff. It provides API parsers for command-line arguments that mesh with its library stuff like Dwfl_Callbacks that set the search path used equivalently to GDB's `set debug-file-directory` path.

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-05-31 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > Ah, I had forgotten completely that file URLs worked out of the box > (libcurl, duh). Yeah. > When we tried that way back when, the issue was just that it > actually does a libcurl fetch out of that path and saves another > copy of the file into the cache. Yes, a copy is made. This is "

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-05-31 Thread Daniel Thornburgh via Elfutils-devel
On Wed, May 31, 2023 at 3:35 PM Frank Ch. Eigler wrote: > > [...] > > It would be really nice if there were, a DEBUGINFOD_LOCAL_PATH > environment > > variable that provided a colon-separated list of directories in the GDB > > `.build-id//` [...] > > Please note that $DEBUGINFOD_URLS can already

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-05-31 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > [...] > It would be really nice if there were, a DEBUGINFOD_LOCAL_PATH environment > variable that provided a colon-separated list of directories in the GDB > `.build-id//` [...] Please note that $DEBUGINFOD_URLS can already include file:// URLs that identify local filesystems whose direct

Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)

2023-05-31 Thread Paul Smith
On Wed, 2023-05-31 at 15:17 -0700, Daniel Thornburgh via Elfutils-devel wrote: > This isn't the case for files available locally, but there is some > prior art: GDB's build ID directory layout (commonly > `/usr/lib/debug/.build-id// build ID>`). GDB has a flag to control this (`--with-separate-debu