Can I debug LinuxThreads program using gdb?
Yes, but not with the stock gdb 4.17. You need a specially patched version of gdb 4.17 developed by Eric Paire and colleages at The Open Group, Grenoble. The patches against gdb 4.17 are available at http://pauillac.inria.fr/~xleroy/linuxthreads/gdb-4.17-debug-threads.patch.gz. H.J.Lu also develops patches for gdb 4.17 that include thread support and more; those are available at ftp://ftp.valinux.com/pub/support/hjl/gdb/. More recent versions of gdb seem to include LinuxThreads support. Some Linux distributions provide an already-patched version of gdb; others don’t. For instance, the gdb in RedHat 5.2 and RedHat 6.2 is thread-aware, but apparently not the one in RedHat 6.0. Just ask (politely) the makers of your Linux distributions to please make sure that they apply the correct patches to gdb.