Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572480 - sys-devel/gcc: gdb pretty-printers installed in wrong directory
Summary: sys-devel/gcc: gdb pretty-printers installed in wrong directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-20 21:37 UTC by Hristo Venev
Modified: 2019-08-21 21:34 UTC (History)
1 user (show)

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 Hristo Venev 2016-01-20 21:37:06 UTC
toolchain.eclass

LIBPATH=/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0
libstdc++.so is /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21

toolchain.eclass:1756

gdbdir=/usr/share/gdb/auto-load${LIBPATH/\/lib\//\/$(get_libdir)\/}

This is obviously wrong. If libstdc++ is at /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21 the pretty-printer should be at /usr/share/gdb/auto-load/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21-gdb.py not /usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6.0.21-gdb.py
lib should not be replaced with $(get_libdir) because the gcc libraries are installed in lib and not in $(get_libdir).

Reproducible: Always
Comment 1 Larry the Git Cow gentoo-dev 2019-08-21 18:28:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd4f6bf307965aeed1117c053bbdd6cd14392dd9

commit cd4f6bf307965aeed1117c053bbdd6cd14392dd9
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-08-21 18:25:02 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-08-21 18:28:20 +0000

    toolchain.eclass: fix gdb autoload path, bug #572480
    
    Reported-and-fixed-by: Hristo Venev
    Bug: https://bugs.gentoo.org/572480
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/toolchain.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-21 18:43:22 UTC
I agree the directory is incorrect.

But looks like gdb still does not autoload libstdc++ pretty-printer unless one loads libstdc++ explicitly. Not sure if something else is broken or it's a default behaviour of gdb.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-21 21:34:24 UTC
(In reply to Sergei Trofimovich from comment #2)
> I agree the directory is incorrect.
> 
> But looks like gdb still does not autoload libstdc++ pretty-printer unless
> one loads libstdc++ explicitly. Not sure if something else is broken or it's
> a default behaviour of gdb.

Checked with.
     (gdb) set debug auto-load on
     (gdb) file ~/src/t/true
     (gdb) start
shows that file is detected \o/

Declaring solved.