From owner-freebsd-questions@FreeBSD.ORG Wed Jul 29 22:09:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 765CE106564A for ; Wed, 29 Jul 2009 22:09:13 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr15.xs4all.nl (smtp-vbr15.xs4all.nl [194.109.24.35]) by mx1.freebsd.org (Postfix) with ESMTP id 04AA98FC15 for ; Wed, 29 Jul 2009 22:09:12 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr15.xs4all.nl (8.13.8/8.13.8) with ESMTP id n6TM9B74059803; Thu, 30 Jul 2009 00:09:11 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 11E98BA8A; Thu, 30 Jul 2009 00:09:11 +0200 (CEST) Date: Thu, 30 Jul 2009 00:09:11 +0200 From: Roland Smith To: Daniel Underwood Message-ID: <20090729220911.GA656@slackbox.xs4all.nl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: Parallel debugging X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2009 22:09:13 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 --=20 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) --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkpwyIcACgkQEnfvsMMhpyVwkwCdFhergJVl92bjwlEMhVDGCSLv E3sAn22CZKTToXvhah+bOT3E6v9strIW =FPO5 -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o--