Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gdb, amd64 and multithreaded
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
sheepdog
Guru
Guru


Joined: 14 Oct 2002
Posts: 369
Location: Edison Enterprises Inc., Lake Oswego, Oregon, USA

PostPosted: Fri Mar 05, 2004 11:24 pm    Post subject: gdb, amd64 and multithreaded Reply with quote

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
http://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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum