When debugging a multithreaded program, gdb 6.0 does not give backtraces beyond the first pthread call, making it effectively impossible to track down where in the application program calls are being made. gdb 5.3 provides complete backtraces. Recompilation of applications does not affect results. Reproducible: Always Steps to Reproduce: 1. emerge gdb-6.0. 2. Compile an application that needs pthreads. 3. Run it under gdb, interrupt it, and enter the "thread apply all backtrace" command. Actual Results: Very brief backtraces were given for all threads, none of which managed to reach above the level of the SDL libraries (which made the pthreads calls directly). Expected Results: The backtraces should have gone all the way back through into the top level application. For comparison, an attachment includes two backtraces from the same point in the cvs version of games-strategy/uqm -- one from gdb 5.3, and one from gdb 6.0. Relevant other notes: On startup, gdb 6.0 gives the line Using host libthread_db library "/lib/libthread_db.so.1". while 5.3 does not. Bug #30841 also implies that gdb 6.0 is required for NPTL support; this system does not use NPTL. (First line of emerge info says Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r3).) Workaround is to downgrade gdb, keeping it at 5.3.
The referenced bug should be Bug #40464, not 30841.
Created attachment 25510 [details] sample backtraces from gdb 6.0 and 5.3 These are the sample backtraces from UQM under gdb 6.0 (first) and 5.3 (second).
libsdl among others is not compiled with -ggdb, and also stripped. Rectify this for all libs used, as well as app, and reopen if still an issue.
re-emerging SDL and recompiling app with -ggdb has no effect on backtrace. The app has always been compiled with -g alone, nor was the app ever stripped. Even when SDL *was* stripped, 5.3 could (and can) still produce backtraces inside the app.
Its automatically stripped by portage ...
The sample backtrace is given is with the default libSDL emerge - does gdb 6.0 add the requirement that nothing may be stripped? 5.3 goes through it with no difficulty.
This problem does not occur with breakpoints; a thread with a breakpoint in it will give a proper backtrace (though all the others will still give "??" for almost every frame, unlike gdb 5.3). This may just be a change in functionality between 6.0 and 5.3.
please try with latest gdb and glibc