Multithreaded Program Debugging

Related Topics:

Viewing the Context of Another Thread Managing the Threads Tab
Threads Tab Setting Environment Variables

The debugger can debug multithreaded applications that use either Solaris threads or POSIX threads.

A multithreaded program is detected by whether it uses libthread.so. A program uses libthreads.so either explicitly, by being compiled with -lthread, or implicitly, by being compiled with -lpthread.

When it detects a multithreaded program, the debugger tries to dynamically load libthread_db.so, a special library for threaded debugging.

Threads Tab

When the debugger detects a multithreaded program, the Threads Tab in the Debugging Window is automatically opened.

The pane lists information about the threads in the currently selected process. The current thread is marked with a green arrow.

While debugging a threaded program you can drag the sash above the Stack Pane to to see the Threads Tab, but it will be closed automatically the next time you debug a non-threaded program.