sheepdog Guru
Joined: 14 Oct 2002 Posts: 369 Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA
|
Posted: Fri Mar 05, 2004 11:24 pm Post subject: gdb, amd64 and multithreaded |
|
|
I have an application that I could debug with gdb on the old 32-bit platform but now running it under gdb yields Quote: | Program received signal SIG32, Real-time event 32.
0x0000002a95dd207e in pthread_getconcurrency () from /lib/libpthread.so.0 |
Anyone know of any issues with gdb/amd64/pthreads?
At the risk of talking to myself I have found that this is the output of gdb when the pthread library has been stripped. This condition can be determined by Code: | file /lib/libpthread* | Fortunately there is a solution as I found after searching the entire web right here on this forum in
https://forums.gentoo.org/viewtopic.php?t=11011&highlight=multithreaded+debugging
Move /usr/bin/strip to /usr/bin/strip.bak and substitute some no-op script in its place. Add "debug" to USE flags and "-DDEBUG -D_DEBUG" to the CFLAGS. Now emerge glibc. The result is a non-stripped version of pthreads and now gdb will be able to see and debugging all threads in a process.
I think this is a testament to the greatness of Gentoo and this forum. Thanks to the flexibility of Gentoo and the rich information source that is this forum the problem was easily solved. Not many other distros could do the same. |
|