Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Sep 1998 10:45:37 -0400
From:      Michael Saal <msaal@qosnet.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   can't debug pthreads with gdb
Message-ID:  <35FE7D90.335AE41F@qosnet.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35FE7D90.335AE41F>