libc/glibc: repair debugging with gdb (glibc 2.9)
authorTitus von Boxberg <titus@v9g.de>
Sat Aug 21 16:46:24 2010 +0200 (2010-08-21)
changeset 2090e3771cd6e420
parent 2089 eddb1bbc7b30
child 2091 7975604aacbd
libc/glibc: repair debugging with gdb (glibc 2.9)

Without this patch, crosstool-ng-built glibc-2.9 prevents
debugging any exeutable with gdb.
gdb says:
[Thread debugging using libthread_db enabled]
find_new_threads_callback: cannot get thread info: generic error
See also https://bugzilla.redhat.com/show_bug.cgi?id=487212
for a discussion of the bug and the solution.
patches/glibc/2.9/610-fix-nptl-init.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.9/610-fix-nptl-init.patch	Sat Aug 21 16:46:24 2010 +0200
     1.3 @@ -0,0 +1,11 @@
     1.4 +--- glibc-2_9.orig/nptl/init.c	2007-10-15 22:25:25.000000000 +0200
     1.5 ++++ glibc-2_9/nptl/init.c	2010-08-18 10:46:06.109098646 +0200
     1.6 +@@ -236,7 +236,7 @@
     1.7 + 
     1.8 + 
     1.9 + /* This can be set by the debugger before initialization is complete.  */
    1.10 +-static bool __nptl_initial_report_events;
    1.11 ++static bool __nptl_initial_report_events __attribute_used__;
    1.12 + 
    1.13 + void
    1.14 + __pthread_initialize_minimal_internal (void)