0
0
mirror of https://github.com/wolfpld/tracy.git synced 2026-01-18 17:11:26 +01:00
Files
tracy/public/client/TracyOverride.cpp

27 lines
505 B
C++

#ifdef TRACY_ENABLE
# ifdef __linux__
# include "TracyDebug.hpp"
# ifdef TRACY_VERBOSE
# include <dlfcn.h>
# include <link.h>
# endif
extern "C" int dlclose( void* hnd )
{
#ifdef TRACY_VERBOSE
struct link_map* lm;
if( dlinfo( hnd, RTLD_DI_LINKMAP, &lm ) == 0 )
{
TracyDebug( "Overriding dlclose for %s", lm->l_name );
}
else
{
TracyDebug( "Overriding dlclose for unknown object (%s)", dlerror() );
}
#endif
return 0;
}
# endif
#endif