(gdb 5.0 or 6.0 on Solaris 9 x86, at least; not sure if it affects Solaris/Sparc)
If you're having problems viewing threads after attaching to a threaded child
process, hack the start_threads() function in worker.c to sleep instead of
exit, then see if you can attach and debug successfully.
Also, see gdb PR 1484 (go to
http://sources.redhat.com/cgi-bin/gnatsweb.pl?database=gdb and view the PR).
Better hacks to worker or gdb probably aren't too hard.