Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdbserver/gdb-6/4 and lots of pthreads
@ 2006-11-15 16:12 jbbachky
  2006-11-15 16:50 ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: jbbachky @ 2006-11-15 16:12 UTC (permalink / raw)
  To: gdb

Hi,
I've got an application with about 40 pthreads running under linux 
2.6.10 w/glibc-2.2.3, compiled with gcc-3.4.3 running on powerpc (and 
eventually a few other architectures). I've been a happy gdb-5.0 user 
for a number of years, with my linux kernel(s) performing the 
breakpoint removal/replacement on context switches.
I've been hoping to remove that code and let gdb handle when and if to 
break based on process id.

In attempting to upgrade to gdb-6.4, I'm afraid that I've run into a 
problem which might require some hacking.

Gdbserver attaches to my main thread and opens a socket, and then after 
invoking gdb and specifying my remote target, I select the particular 
thread that I wish to debug. Info threads shows all of my threads, and 
I see that gdbserver now attaches to all of them.

Any attempt to single-step or continue with a breakpoint results in a 
"thrashing system". A counter in my context switching code shows almost 
150k switchs/second, up from about 1200/sec when not attached with gdb. 
One of the 40 pthreads handle a 10ms SIGALRM. Almost all of the others 
are waiting for messages.

Is there a fundamental problem with the number of threads and 
attaching/detaching/waking them all?
Do I need to continue to "hide" my other threads from gdb/gdbserver?. I 
am building with dynamic linking, and gdbserver finds and uses 
libthread_db.so.

Thanks for any help or advice.
________________________________________________________________________
Check Out the new free AIM(R) Mail -- 2 GB of storage and 
industry-leading spam and email virus protection.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-11-29 15:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-15 16:12 gdbserver/gdb-6/4 and lots of pthreads jbbachky
2006-11-15 16:50 ` Daniel Jacobowitz
2006-11-15 17:08   ` jbbachky
2006-11-16 15:15     ` Daniel Jacobowitz
2006-11-16 21:53   ` jbbachky
2006-11-16 22:04     ` Daniel Jacobowitz
2006-11-17 18:47       ` jbbachky
2006-11-17 19:08         ` Daniel Jacobowitz
2006-11-17 20:01           ` jbbachky
2006-11-17 20:14             ` Daniel Jacobowitz
2006-11-29 15:23               ` jbbachky
2006-11-29 15:26                 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox