When /lib/ld-linux.so.2 gets stripped it loses a symbol called '_dl_debug_state" which GDB uses to set break points in dlopen'd libraries. Thus making debugging of run time loaded code rather impossible. Here is the warning output by GDB during a debug session: warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. I was able to resolve this issue with: FEATURES="nostrip" emerge glibc I saw some patches to debian builds that will strip the ld-linux.so but exclude the _dl_debug_state with the -K switch to strip. Reproducible: Always Steps to Reproduce: 1. Emerge a stripped version of glibc 2. Run GDB on a program that loads shared objects at run time 3. Note the inability to set breakpoints in shared object code
You failed to provide enough info or do your homework... Please read http://www.catb.org/~esr/faqs/smart-questions.html 1) what version of glibc are you talking about. 2) this bug has been resolved already. 3) you failed to search bugzilla for dups.
Sorry if the above seems harsh at all. We just see alot of dups.
I apologize for not providing the version of glibc. But as to searching for dups, I did, quite thoroughly. Sometimes its hard to find things in the bug database, especially since its not segragated by package. Just wanted to make sure it was something that had been reported, next time I'll try and do better. glibc 2.3.3.20040420-r1
Look like that this BUG is _not_ fixed, at least not in the stable tree;-) Take a look at BUG #46186: ------- Additional Comment #10 From SpanKY 2004-08-02 17:01 PST ------- fixed in glibc-2.2.5-r9, glibc-2.3.2-r10, and glibc-2.3.4.20040619 I missing sys-libs/glibc-2.3.3.20040420-r1 This version is the current stable version, and in this ebuild the fix is missing.
Please note that the bug is not fixed. Tested with glibc-2.3.4.20040808-r1, the current stable version. The fix for #46186 only keeps the thread libs from being stripped, the linker is still stripped. As a workaround I added the lines + # Also, don't strip the dynamic linker: + mv ${D}/$(get_libdir)/ld-* ${T}/thread-backup as suggested in http://groups.google.de/groups?hl=de&lr=&ie=UTF-8&threadm=3wDpJ-16j-21%40gated-at.bofh.it&rnum=1&prev=/groups%3Fhl%3Dde%26lr%3D%26ie%3DUTF-8%26selm%3D3wDpJ-16j-21%2540gated-at.bofh.it