all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 48907@debbugs.gnu.org
Subject: bug#48907: Grafts cause discrepancies in debug symbols file names (debug symbols missing in GDB).
Date: Tue, 28 Sep 2021 12:28:39 +0200	[thread overview]
Message-ID: <87lf3hdmeg.fsf@gnu.org> (raw)
In-Reply-To: <877df1f2zk.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 28 Sep 2021 11:45:03 +0200")

Ludovic Courtès <ludo@gnu.org> skribis:

> Conversely, IIUC what the “normative parts of the output contents” (info
> "(ld) Options") really are, build IDs are computed on the code, not on
> debug info.
>
> But the problems remains the same I think: if you have
> /gnu/store/abc…/libfoo.so and /gnu/store/xyz…/libfoo.so, chances are
> that they are different due to embedded store file names, and thus get a
> different build ID.

We discussed this with Mark Wielaard on #guix¹, and one important
takeaway is:

--8<---------------cut here---------------start------------->8---
<civodul> so gdb just checks that the separate debug file has the same
	  build-id as the code, right?  [12:16]
<civodul> it doesn't matter whether it really is the sha1 of all those
	  sections, does it?
<mjw> that is kind of the whole point of the build-id, that it captures the
      whole build environment, not just the generated code, but also how it
      was generated (which is what the .debug sections kind of represent)
<civodul> ok  [12:17]
<mjw> civodul, no, it doesn't need to be a hash over the actual bits
      produced. It can be a completely different hash, it can be a different
      number of bits (but not too short, they need to be globally unique).
<civodul> ok, so we could have our own way of caculating build IDs  [12:18]
<mjw> civodul, all that really matters is that it uniquely identifies this
      binary blob. If any input, source, compiler, flags, etc. changes, it
      should be unique.
--8<---------------cut here---------------end--------------->8---

So I suspect that we would not need to rewrite build IDs upon grafting,
and we could use the ungrafted debug info with grafted code and vice
versa.

We should try it out to test the hypothesis, but if that works, that’d
be great.

Ludo’.

¹ https://logs.guix.gnu.org/guix/2021-09-28.log#114610




  reply	other threads:[~2021-09-28 10:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 18:19 bug#48907: Debug symbols file name discrepancies Maxim Cournoyer
2021-06-07 19:26 ` Maxim Cournoyer
2021-06-18  9:29 ` Ludovic Courtès
2021-09-24  2:32   ` bug#48907: Grafts cause discrepancies in debug symbols file names (debug symbols missing in GDB) Maxim Cournoyer
2021-09-24 14:14     ` Ludovic Courtès
2021-09-28  2:25       ` Maxim Cournoyer
2021-09-28  9:45         ` Ludovic Courtès
2021-09-28 10:28           ` Ludovic Courtès [this message]
2021-10-04 13:14         ` Ludovic Courtès
2024-04-27  8:02           ` pelzflorian (Florian Pelz)

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=87lf3hdmeg.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=48907@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.