On Thu, Jul 06, 2000, Vladimir Kondratiev wrote:

> Hello, Assume I have multithreading program written with Pth and I'm
> debugging it with gdb.  How could I browse list of threads? How could I see
> stack trace for each one?

You usually can't very easily. Pth provides only a pth_dumpstate() variable
you can call do display the current thread set. But there is still no support
for gdb's internal knowledge of threads.  You can only use breakpoints inside
various threads and then use "bt" inside gdb to show the stack trace of
the current active thread. But you cannot look at arbitrary (= currently
not active threads) from within gdb.

> For Pthreads this is supported directly by gdb.

Pthreads is just an API and Pth is as much Pthreads as any other Pthread
implementation. What you certainly mean is that gdb supports a few Pthread
implementations (e.g. LinuxThreads) out-of-the-box. But this has nothing to do
with Pthreads, it's just because gdb is shipped with a few patches for
LinuxThreads applied.  I've still not created gdb patches for Pth, but I
appreciate if someone contributes them. This issue is still on my todo list.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]
  • Debugging Vladimir Kondratiev
    • Ralf S. Engelschall

Reply via email to