Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 680130

Summary: sys-devel/binutils-2.32 breaks split debug packages and gdb debugging
Product: Gentoo Linux Reporter: bug2017
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=678780
https://bugs.gentoo.org/show_bug.cgi?id=678790
https://bugs.gentoo.org/show_bug.cgi?id=679564
https://bugs.gentoo.org/show_bug.cgi?id=671692
Whiteboard:
Package list:
Runtime testing required: ---

Description bug2017 2019-03-12 14:14:33 UTC
Building packages with sys-devel/binutils-2.32 creates defect/incompatible debug information. gdb exits as soon a such a debug file is loaded. This migh affect many other bugreporting tools.

The same bug in ubuntu: https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1815774

Steps to reproduce:

1) update to sys-devel/binutils-2.32
2) rebuild/update any package like sys-libs/glibc
3) try to debug any program with gdb 

gdb will exit with (in case of glibc):
BFD: /usr/lib64/debug/lib64/ld-2.28.so.debug: unable to initialize decompress status for section .debug_aranges


Downgrading sys-devel/binutils-2.31.1-r4 is not enough, all packages build after the update need to be build again. 

Possible rollback (might take a few hours)

buildafterbinutils-2.32
---
#!/bin/bash
stime=$(cat /var/db/pkg/sys-devel/binutils-2.32/BUILD_TIME)
for dir in /var/db/pkg/*/* ; do
    if [ -f $dir/BUILD_TIME ] ; then
        btime=$(<$dir/BUILD_TIME)
        if [ $btime -ge $stime ] ; then
            package=$(basename $dir)
            category=$(basename $(dirname $dir))
            echo =$category/$package
        fi
    fi
done
---

1) "emerge -1a =sys-devel/binutils-2.31.1-r4"
2) "eselect binutils list" (and select the older version)
3) "./buildafterbinutils-2.32" (displays all packages)
4) "./buildafterbinutils-2.32 > packagelist" (keep a list in case emerge fails after rebuilding binutils-2.32)
5) "emerge -av1 $(./buildafterbinutils-2.32)"
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-12 19:25:59 UTC
It is the other way around: old gdb can't read debug info of newer binutils. Unfortunately old binutils used to write incorrect compresstion section size.

*** This bug has been marked as a duplicate of bug 679564 ***