# HG changeset patch # User Alain Mazy # Date 1761310435 -7200 # Node ID 288bfdf03d95f6125778ed15db1707fafdae7e34 # Parent add962490217dce6d7b5d0d6997853b87c9945e6 set thread names at system level too to make them visible in GDB diff -r add962490217 -r 288bfdf03d95 OrthancFramework/Sources/Logging.cpp --- a/OrthancFramework/Sources/Logging.cpp Fri Oct 24 14:26:52 2025 +0200 +++ b/OrthancFramework/Sources/Logging.cpp Fri Oct 24 14:53:55 2025 +0200 @@ -658,6 +658,11 @@ } threadNames_[id] = name; + +#if defined(__linux__) + // set the thread name at "system" level too -> required to have the thread names visible in GDB ! + pthread_setname_np(pthread_self(), name.substr(0, 15).c_str()); // thread names are limited to 15 in Linux +#endif } void SetCurrentThreadName(const std::string& name)