mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Retrieve correct symbol address.
This commit is contained in:
parent
85e11c2d97
commit
579339dd24
@ -6736,15 +6736,27 @@ void Worker::ProcessCodeInformation( const QueueCodeInformation& ev )
|
|||||||
auto cit = m_checkedFileStrings.find( ref );
|
auto cit = m_checkedFileStrings.find( ref );
|
||||||
if( cit == m_checkedFileStrings.end() )
|
if( cit == m_checkedFileStrings.end() )
|
||||||
{
|
{
|
||||||
auto& symmap = GetSymbolMap();
|
uint64_t baseAddr = 0;
|
||||||
auto it = symmap.find( ev.symAddr );
|
if( HasSymbolCode( ev.symAddr ) )
|
||||||
if( it == symmap.end() )
|
{
|
||||||
|
baseAddr = ev.symAddr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto parentAddr = GetSymbolForAddress( ev.symAddr );
|
||||||
|
if( parentAddr != 0 && HasSymbolCode( parentAddr ) )
|
||||||
|
{
|
||||||
|
baseAddr = parentAddr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const SymbolData* sym = baseAddr == 0 ? nullptr : GetSymbolData( baseAddr );
|
||||||
|
if( !sym )
|
||||||
{
|
{
|
||||||
CacheSource( ref );
|
CacheSource( ref );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CacheSource( ref, it->second.imageName );
|
CacheSource( ref, sym->imageName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user