[75] in Pthreads mailing list archive
Re: debugging pthreads applications
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Tue Aug 15 14:43:51 1995
Date: Tue, 15 Aug 95 13:58:39 EDT
From: Ken Raeburn <raeburn@cygnus.com>
To: Umesh Soni <U.Soni@cs.ucl.ac.uk>
Cc: pthreads@MIT.EDU
In-Reply-To: Umesh Soni's message of Tue, 15 Aug 95 16:56:55 +0100
From: Umesh Soni <U.Soni@cs.ucl.ac.uk>
Date: Tue, 15 Aug 95 16:56:55 +0100
Hi all,
I am using the pthreads library and am having some problems
debugging my programs.
I was wondering if someone could advise me on the best debugging
tools and techniques to use. I am currently compiling with gcc and
rely on gdb for debugging -the problem is that gdb does not seem to
be aware of any new threads that I create (when using the 'info threads'
command.
Unfortunately, gdb does not currently know how to locate the list of
threads; it doesn't know anything about this package. All gdb will
see is one process with occasionally unusual stack pointer values.
I've been talking to a couple of people about fixing this, but no
progress yet.
We've put routines into the library that you can call to dump out the
thread state info. The routine pthread_dump_info is one such, though
you may have to tweak your application a little to cause it to get
linked into the executable. (Unfortunately, I'm looking at the
development sources and not the last beta release. If this went in
since the last release, I apologize; you'll have to wait for the next
release to use it, though Chris said that should be soon.)