--- Begin Message ---
Subject: |
Grafts break debug outputs |
Date: |
Sun, 01 Mar 2015 00:06:11 -0500 |
Grafts break debug outputs, or at least that's my guess.
Here's what I see:
address@hidden:~$ guix build guile
guix build: warning: ambiguous package specification `guile'
guix build: warning: choosing guile-2.0.11 from gnu/packages/guile.scm:110:2
/gnu/store/3lhr8q28q6f59774di9av7ncy09jd55d-guile-2.0.11
/gnu/store/rgv3fvy6xqp6966rfh8v6fv7m48abcbh-guile-2.0.11-debug
address@hidden:~$ guix package -I guile
guile 2.0.11 out /gnu/store/3lhr8q28q6f59774di9av7ncy09jd55d-guile-2.0.11
guile 2.0.11 debug
/gnu/store/rgv3fvy6xqp6966rfh8v6fv7m48abcbh-guile-2.0.11-debug
address@hidden:~$ ls -l .guix-profile/lib/debug/gnu/store/
total 8
lrwxrwxrwx 12 root guixbuild 128 Dec 31 1969
122jv790mv2mlnylbrbzav65vghbw93n-guile-2.0.11 ->
/gnu/store/rgv3fvy6xqp6966rfh8v6fv7m48abcbh-guile-2.0.11-debug/lib/debug/gnu/store/122jv790mv2mlnylbrbzav65vghbw93n-guile-2.0.11
lrwxrwxrwx 15 root guixbuild 127 Dec 31 1969
3g20rdmnavpblsmgppyl8jhg67nidhjk-glibc-2.20 ->
/gnu/store/hrny2whqg9c3m0klyfpbmmcyiir9yf8m-gcc-toolchain-4.9.2/lib/debug/gnu/store/3g20rdmnavpblsmgppyl8jhg67nidhjk-glibc-2.20
I guess GDB can't find the debugging information because
122jv790mv2mlnylbrbzav65vghbw93n-guile-2.0.11 is the name of the guile
directory *before* grafting.
To work around this, I created my own ~/mydebug directory:
address@hidden:~/mydebug/gnu/store$ ln -s
/gnu/store/rgv3fvy6xqp6966rfh8v6fv7m48abcbh-guile-2.0.11-debug/lib/debug/gnu/store/122jv790mv2mlnylbrbzav65vghbw93n-guile-2.0.11
3lhr8q28q6f59774di9av7ncy09jd55d-guile-2.0.11
and then pointed GDB at ~/mydebug and then debugging works again.
Mark
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#19973: Grafts break debug outputs |
Date: |
Fri, 24 Aug 2018 18:08:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello,
address@hidden (Ludovic Courtès) skribis:
> The patches below address this by adding code to update the CRC in the
> ‘.gnu_debuglink’ section upon grafting. It uses a simple hook
> mechanism, a simplified version of what Timothy proposed.
>
> The ‘.gnu_debuglink’ hook does nothing for packages that lack a “debug”
> output. For packages that have a “debug” output, only ELF files from
> bin/, lib/, etc. are considered. Overall the run-time cost should be
> low.
I went ahead and pushed these two patches as
93c333895a4e2dc9baabec8ade60d9d2ac0a91e2 and
e4297aa8b95cefa32e2595ce58886fc03b0561f7.
I modified tests/debug-link.scm compared to what I posted such that it
would skip tests that require %bootstrap-gcc when networking is lacking.
Thanks for your feedback,
Ludo’.
--- End Message ---