Sun Studio 12: Debugging a Program With dbx

-thread thread_id

The action is executed only if the thread that caused the event matches thread_id. The specific thread you have in mind might be assigned a different thread_id from one execution of the program to the next.