From owner-freebsd-questions Tue Sep 15 17:09:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA12759 for freebsd-questions-outgoing; Tue, 15 Sep 1998 17:09:54 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA12547 for ; Tue, 15 Sep 1998 17:08:52 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.8/8.8.8) with ESMTP id RAA20507; Tue, 15 Sep 1998 17:08:23 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Date: Tue, 15 Sep 1998 17:08:23 -0700 (PDT) From: Doug White To: Michael Saal cc: freebsd-questions@FreeBSD.ORG Subject: Re: can't debug pthreads with gdb In-Reply-To: <35FE7D90.335AE41F@qosnet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 15 Sep 1998, Michael Saal wrote: > I am having a lot of trouble trying to debug a multi threaded app in > gdb. > > I am compiling with -D_THREAD_SAFE , linking with libc_r and used > FreeBSD versions 2.2.6 and 2.2.7 > > If I run my app without gdb or don't set any breakpoints in gdb 'top' > says that my apps process uses virtually no CPU cycles. gdb makes assumptions that you're debugging a standard linear program, not a multithreaded one. Debugging multithreaded programs is a pain in the tail. I'd suggest profuse amounts of scaffolding (printf()s). Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message