diff options
Diffstat (limited to 'public/client/TracyOverride.cpp')
-rw-r--r-- | public/client/TracyOverride.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/public/client/TracyOverride.cpp b/public/client/TracyOverride.cpp new file mode 100644 index 00000000..591508a7 --- /dev/null +++ b/public/client/TracyOverride.cpp @@ -0,0 +1,26 @@ +#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\n", lm->l_name ); + } + else + { + TracyDebug( "Overriding dlclose for unknown object (%s)\n", dlerror() ); + } +#endif + return 0; +} + +# endif +#endif |