Parallel debugging

Roland Smith rsmith at xs4all.nl
Wed Jul 29 22:09:13 UTC 2009


On Wed, Jul 29, 2009 at 12:58:19PM -0400, Daniel Underwood wrote:
> I'm programming a multithreaded scientific program using pthreads and
> c++.  Currently The model is SMP, but may investigate MMP using MPI in
> the future.  Can anyone suggest a good debugger and possibly an
> associated GUI? (E.g., gdb and ddd.)

Both gdb and ddd can in principle be used with multithreaded programs.

IMHO there is no good way to analyze a multithreaded program with a
debugger, AFAIK. E.g. do not expect the program running in the debugger
to behave the same as when running outside of the debugger, especially
if you are dealing with timing issues or heisenbugs.

The UNIX philiosophy would be to make multiple programs that can
exchange (preferably plain text) data via pipes or shared memory. That
way you can test the components separately. Look e.g. at postfix.

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090729/6a5294d7/attachment.pgp


More information about the freebsd-questions mailing list