Summary: | sys-devel/gdb unusable with multithreaded apps after upgrade to glibc-2.6.1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Axel Mueller <aegges> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | dushistov, gentoo, mihai.stanescu, saintdev |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | glibc-nostrip-libpthread.patch |
Description
Axel Mueller
2007-10-16 11:26:39 UTC
There is already a bug report filed in at the gdb website. http://sourceware.org/cgi-bin/gnatsweb.pl?database=gdb Bug report 2321. http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2321 > I suspect that your ld.so or > libpthread.so is stripped of the symbols GDB needs to debug threads. So, I tried reemerging glibc with USE="debug" and FEATURES="nostrip". Before: $ file /lib/libpthread-2.6.1.so /lib/libpthread-2.6.1.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, stripped After: $ file /lib/libpthread-2.6.1.so /lib/libpthread-2.6.1.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, not stripped And, GDB works now. So it seems that the ebuild is stripping libpthread when it really shouldn't. I tried stripping both ld-2.6.1.so and libpthread-2.6.1.so, and the only time GDB gives me the "ptrace: no such process" is when I strip libpthread, stripping ld-2.6.1.so doesn't seem to affect GDB at all. Hopefully one of the glibc maintainers can fix this so we can actually use GDB again without having to install a fully non stripped copy of glibc. Created attachment 134666 [details, diff] glibc-nostrip-libpthread.patch Here's a patch to fix stripping of libpthread. Hopefully this will speed the integration into the ebuild (well technically the eblit file) itself a little bit. It also looks like this isn't the first time this has happened see Bug 46186. Also notice the last comment, it looks like someone noticed earlier as well. *** Bug 198448 has been marked as a duplicate of this bug. *** fixed in cvs and released with glibc-2.7-r1 http://sources.gentoo.org/sys-libs/glibc/files/eblits/src_install.eblit?r1=1.3&r2=1.4 *** Bug 202026 has been marked as a duplicate of this bug. *** |