public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Paul Smith <paul@mad-scientist.net>
To: Daniel Thornburgh <dthorn@google.com>, elfutils-devel@sourceware.org
Subject: Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)
Date: Wed, 31 May 2023 18:35:09 -0400	[thread overview]
Message-ID: <4bfeb238ccf7511c41d95d43c5cdaaab405b964b.camel@mad-scientist.net> (raw)
In-Reply-To: <CAEdiOyeCSvpUijvZwJ=W2ncsGokefdm8z3yKVG+u4jkAgXcumw@mail.gmail.com>

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/<first 2 chars of build ID>/<remainder of
> build ID>`). GDB has a flag to control this (`--with-separate-debug-
> dir`), but that flag isn't shared by other tools. For example,
> binutils supports this layout, but it simply hardcodes a list of
> directories to search for, with no way to extend or override it. LLVM
> also supports this, but has a differently named flag for it.

Having content in /usr/lib is less good.  It's perfect for allowing
package managers to install debug info files for packages, but it's not
good for allowing users to either download or "publish" their own info
files.

Couldn't the standard XDG environment variables be used to generate a
search path or paths, rather than inventing new ones (or, the new
variable can be used to override the default which is computed based on
XDG), to find the user's personal build ID directories?  This location
can be updated without root, can easily be made available inside
containers (flatpak / snap), etc.

If everyone could agree on a naming convention so that all tools that
need debug info could write them to a common location after download
(or even on generation), and check that location for files first before
querying debuginfod, that would be a great "it just works" feature and
avoid a lot of duplication.

Or, maybe I'm just misunderstanding something :).

  reply	other threads:[~2023-05-31 22:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 22:17 Daniel Thornburgh
2023-05-31 22:35 ` Paul Smith [this message]
2023-05-31 22:35 ` Frank Ch. Eigler
2023-05-31 22:45   ` Daniel Thornburgh
2023-05-31 23:04     ` Frank Ch. Eigler
2023-06-01 14:58     ` Frank Ch. Eigler
2023-06-01 20:54       ` Daniel Thornburgh
2023-06-01 21:21         ` Frank Ch. Eigler
2023-06-01 23:51           ` Daniel Thornburgh
2023-05-31 23:44 ` Roland McGrath
2023-06-14 15:57   ` Mark Wielaard
2023-06-14 19:43     ` Roland McGrath
2023-06-19 11:53       ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bfeb238ccf7511c41d95d43c5cdaaab405b964b.camel@mad-scientist.net \
    --to=paul@mad-scientist.net \
    --cc=dthorn@google.com \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).