public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Daniel Thornburgh <dthorn@google.com>
Cc: elfutils-devel@sourceware.org
Subject: Re: Local Build ID Directory Lookup (DEBUGINFOD_LOCAL_PATH)
Date: Wed, 31 May 2023 18:35:55 -0400	[thread overview]
Message-ID: <20230531223555.GC26841@redhat.com> (raw)
In-Reply-To: <CAEdiOyeCSvpUijvZwJ=W2ncsGokefdm8z3yKVG+u4jkAgXcumw@mail.gmail.com>

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/<xx>/<xxxxxx>` [...]

Please note that $DEBUGINFOD_URLS can already include file:// URLs
that identify local filesystems whose directory structure mirrors the
webapi.  The old-school /usr/lib/debug/.build-id/xx/xxxxxxxx.debug
file hierarchy doesn't match that, and of course lacks source code
entirely.  

OTOH a shell script that creates debuginfod-style tree of symlinks
into the old-school hierarchy - for debuginfo/executables only - could
work, and work with current day unmodified debuginfod clients &
servers.  i.e.,:

          find /usr/lib/debug/.build-id -name '*.debug' | while read g; do
               buildid=`echo $g | cut -f6,7 -d/ | tr -d / | cut -f1 -d.`
               mkdir -p buildid/$buildid
               ln -s $g buildid/$buildid/debuginfo
          done

and similar for .../executable

Then the resulting tree is suitable for use as DEBUGINFOD_URLS=file://`pwd`
to a debuginfod server or a client.


- FChE


  parent 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
2023-05-31 22:35 ` Frank Ch. Eigler [this message]
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=20230531223555.GC26841@redhat.com \
    --to=fche@redhat.com \
    --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).