I don't know of any such facility so I don't think you will get off that easily - and it probably wouldn't be as informative as you think in helping to debug your program. As low tech as it might seem, logging is your friend in debugging these things. Start collecting your own little logging functions. They don't have to be fancy, they just have to get the job done while debugging.
Sorry for the C++ but something like:
void logit(const bool aquired, const char* lockname, const int linenum)
if (! aquired)
logfile << pthread_self() << " tries lock " << lockname << " at " << linenum << endl;
logfile << pthread_self() << " has lock " << lockname << " at " << linenum << endl;
logit(false, "some_mutex", __LINE__);
logit(true, "some_mutex", __LINE__);
// do stuff ...
Logging isn't a perfect solution but nothing is. It usually gets you what you need to know.