From owner-freebsd-questions Tue Sep 15 07:37:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA19237 for freebsd-questions-outgoing; Tue, 15 Sep 1998 07:37:19 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from qosnetics.com (qosnetics.com [209.137.14.2]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA19229 for ; Tue, 15 Sep 1998 07:37:15 -0700 (PDT) (envelope-from msaal@qosnet.com) Received: (qmail 11916 invoked from network); 15 Sep 1998 14:50:42 -0000 Received: from bertha.portsmouth (HELO qosnet.com) (192.32.47.90) by lucy.portsmouth with SMTP; 15 Sep 1998 14:50:42 -0000 Message-ID: <35FE7D90.335AE41F@qosnet.com> Date: Tue, 15 Sep 1998 10:45:37 -0400 From: Michael Saal X-Mailer: Mozilla 4.5b2 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: can't debug pthreads with gdb Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. I can step and break in code that is in my primary or main() thread. When I set a breakpoint in a thread created with pthread_create() and the breakpoint is hit 'top' shows my apps process consuming all of the CPU cycles. gdb never breaks and the only way to regain control is to kill my apps process. Any help on how to solve this debugging problem would greatly be appreciated To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message