mirror of
https://github.com/slendidev/lunar.git
synced 2026-01-31 00:38:59 +02:00
26
subprojects/tracy/public/client/TracyOverride.cpp
Normal file
26
subprojects/tracy/public/client/TracyOverride.cpp
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user