Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680130 - sys-devel/binutils-2.32 breaks split debug packages and gdb debugging
Summary: sys-devel/binutils-2.32 breaks split debug packages and gdb debugging
Status: RESOLVED DUPLICATE of bug 679564
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-12 14:14 UTC by bug2017
Modified: 2019-03-12 19:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***