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

Bug 48116

Summary: Stripping symbols from glibc prevents debugging multi-thread apps
Product: Gentoo Linux Reporter: Luca Celetto <celetto>
Component: [OLD] DevelopmentAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal CC: celetto, ulanov
Priority: High    
Version: 2004.0   
Hardware: x86   
OS: Linux   
URL: http://www.rawbw.com/~marka/geek/gdb-mdk9.html
Whiteboard:
Package list:
Runtime testing required: ---

Description Luca Celetto 2004-04-17 02:41:30 UTC
Multi-thread applications can not be debugged with GDB due to a real-time SIG32 appearing whenever a new thread is generated through pthread_create() function.

Moreover, when the application is stopped, threads info can not be displayed and switch to another thread is not possible.

This is due to stripping the symbols from the libpthread.so library during compiling time and was reported in Mandrake 9.0, see page

http://www.rawbw.com/~marka/geek/gdb-mdk9.html

Solution is to put in the glic*.ebuild file the following line

RESTRICT="nostrip"

(see page http://reviewed.homelinux.org/man/ebuild/ for details).
Comment 1 solar (RETIRED) gentoo-dev 2004-06-05 21:45:55 UTC
other devs... How do you feel about this? glibc is a rather hefty library I'd rather see it stripped by default. 
However I can live with only libpthread not being stripped, but the whole pkg..

Maybe we could/should add a really ugly hack to prepstrip something like
Comment 2 solar (RETIRED) gentoo-dev 2004-06-06 12:48:54 UTC
if [ -z "${f/*SB shared object*/}" ]; then
[ -x /bin/basename  -a "$(basename ${x})" == "libpthread-0.10.so" ] && x="-V"
Comment 3 SpanKY gentoo-dev 2004-07-31 00:16:13 UTC

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