mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Call SymLoadModuleEx for modules loaded after init
This fixes issue #293. Symbols are not loaded if the module is loaded dynamically after the SymInitialize call. This may stall the symbol resolver thread a bit the first time a module is loaded.
This commit is contained in:
parent
14392a6e0e
commit
17855cbac5
@ -296,6 +296,8 @@ static const char* GetModuleName( uint64_t addr )
|
||||
const auto res = GetModuleFileNameA( mod[i], name, 1021 );
|
||||
if( res > 0 )
|
||||
{
|
||||
// since this is the first time we encounter this module, load its symbols (needed for modules loaded after SymInitialize)
|
||||
SymLoadModuleEx(proc, NULL, name, NULL, (DWORD64)info.lpBaseOfDll, info.SizeOfImage, NULL, 0);
|
||||
auto ptr = name + res;
|
||||
while( ptr > name && *ptr != '\\' && *ptr != '/' ) ptr--;
|
||||
if( ptr > name ) ptr++;
|
||||
|
Loading…
Reference in New Issue
Block a user