views:

1995

answers:

8

GDB has severe issues when debugging with multiple threads (pthreads). Are there any other good multi-threaded debuggers for C/C++ on *nix?

A: 

Unfortunately there is nothing as good, as gdb, I think.

You can give http://www.zero-bugs.com a try/

rawicki
+1  A: 

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.

X-Istence
A: 

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
+3  A: 

TotalView is what the national labs use for huge clusters. I believe it has some good support for thread parallelism, too. It's probably out of your price range, but you can try it for free.

tgamblin
A: 

@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.

rawicki
+4  A: 

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:

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

Burly
+3  A: 

Distributed Debugging Tool (DDT) ... graphical debugger for scalar, multi-threaded and large-scale parallel applications that are written in C, C++ and Fortran.

Ronny
A: 

The AIX debugger for windows, let's you debug multithread applications.

EvilTeach