diff --git a/libs/pbd/debug.cc b/libs/pbd/debug.cc index c145a9c9e3..cc691221a4 100644 --- a/libs/pbd/debug.cc +++ b/libs/pbd/debug.cc @@ -31,6 +31,7 @@ #include "pbd/debug.h" #include "pbd/error.h" +#include "pbd/pthread_utils.h" #include "pbd/i18n.h" @@ -102,6 +103,10 @@ PBD::new_debug_bit (const char* name) void PBD::debug_only_print (const char* prefix, string str) { + if ((PBD::debug_bits & DEBUG::Threads).any()) { + printf ("0x%x (%s) ", (int) DEBUG_THREAD_SELF, pthread_name()); + } + if ((PBD::debug_bits & DEBUG::DebugTimestamps).any()) { printf ("%ld %s: %s", g_get_monotonic_time(), prefix, str.c_str()); } else {