GDB has severe issues when debugging with multiple threads (pthreads). Are there any other good multi-threaded debuggers for C/C++ on *nix?
Unfortunately there is nothing as good, as gdb, I think.
You can give http://www.zero-bugs.com a try/
From my search, I have not found any good multi-thread debuggers for *nix. GDB seems to be getting better, and the last time I had to debug a multi-threaded application on FreeBSD (7.0-RELEASE) it behaved fairly well, letting me find where the error was.
I once looked for a gdb alternative, but unfortunately every one I found was based on gdb. I think this is because gdb is intricately tied to gcc, and it's hard for third-party debuggers to keep up with every gcc change.
@magpulse Probably it's rather caused by complexity of gdb. It's a really big tool and people are used to it (even though they hate it the effort of learning how to use a new debugger would be magnificient). It's very hard to create a replacement which will be adopted by the community.
The best thing we can do is live with gdb and report bugs (or patches) to its developers.
I've personally not had any GDB specific issues when debugging a multi-threaded application, so it may helpful for you to elaborate on exactly what "issues" you are having. It will help us answer you better.
There are several aids that I have used in the past when debugging multi-threaded applications in linux, most of which build upon GDB rather than replace it. These include:
- DDD http://www.gnu.org/software/ddd/
- Eclipse http://www.eclipse.org/
- Native POSIX Thread Library (NTPL) Trace Tool http://nptltracetool.sourceforge.net/
Additionally, if you are new to debugging in Linux (and even if you aren't!) I highly recommend the paper titled "Debugging Linux Applications" which you can find here:
http://www.scribd.com/doc/3009706/Debugging-Linux-Applications
Distributed Debugging Tool (DDT) ... graphical debugger for scalar, multi-threaded and large-scale parallel applications that are written in C, C++ and Fortran.
The AIX debugger for windows, let's you debug multithread applications.