The Oracle Solaris Studio software includes a tool called the Thread Analyzer. This tool enables you to analyze the execution of a multithreaded program. It can detect multithreaded programming errors such as data races or deadlocks in code that is written using the Pthread API, the Oracle Solaris thread API, OpenMP directives, Oracle parallel directives, Cray® parallel directives, or a mix of these technologies.
See the Oracle Solaris Studio 12.3: Debugging a Program With dbx guide for more information.