mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Merge pull request #524 from Lectem/fixSymbolResolutionWin32
Fix race condition for symbols resolution on windows
This commit is contained in:
commit
122f99c042
@ -227,6 +227,10 @@ void InitCallstack()
|
|||||||
const auto res = GetModuleFileNameA( mod[i], name, 1021 );
|
const auto res = GetModuleFileNameA( mod[i], name, 1021 );
|
||||||
if( res > 0 )
|
if( res > 0 )
|
||||||
{
|
{
|
||||||
|
// This may be a new module loaded since our call to SymInitialize.
|
||||||
|
// Just in case, force DbgHelp to load its pdb !
|
||||||
|
SymLoadModuleEx(proc, NULL, name, NULL, (DWORD64)info.lpBaseOfDll, info.SizeOfImage, NULL, 0);
|
||||||
|
|
||||||
auto ptr = name + res;
|
auto ptr = name + res;
|
||||||
while( ptr > name && *ptr != '\\' && *ptr != '/' ) ptr--;
|
while( ptr > name && *ptr != '\\' && *ptr != '/' ) ptr--;
|
||||||
if( ptr > name ) ptr++;
|
if( ptr > name ) ptr++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user