mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Dl_info doesn't destroy data.
This commit is contained in:
parent
5f6b3d2cd5
commit
9ae71ac4ee
@ -379,7 +379,7 @@ static int SymbolAddressDataCb( void* data, uintptr_t pc, const char* fn, int li
|
||||
if( !fn )
|
||||
{
|
||||
const char* symloc = nullptr;
|
||||
static Dl_info dlinfo;
|
||||
Dl_info dlinfo;
|
||||
if( dladdr( (void*)ptr, &dlinfo ) ) symloc = dlinfo.dli_fname;
|
||||
if( !symloc ) symloc = "[unknown]";
|
||||
sym.file = symloc;
|
||||
@ -581,7 +581,7 @@ const char* DecodeCallstackPtrFast( uint64_t ptr )
|
||||
SymbolData DecodeSymbolAddress( uint64_t ptr )
|
||||
{
|
||||
const char* symloc = nullptr;
|
||||
static Dl_info dlinfo;
|
||||
Dl_info dlinfo;
|
||||
if( dladdr( (void*)ptr, &dlinfo ) ) symloc = dlinfo.dli_fname;
|
||||
if( !symloc ) symloc = "[unknown]";
|
||||
return SymbolData { symloc, 0, false };
|
||||
|
Loading…
Reference in New Issue
Block a user