mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Properly check if symbol code is available.
This commit is contained in:
parent
aa72cb6ab9
commit
5e559322a0
@ -242,21 +242,23 @@ bool View::ViewDispatch( const char* fileName, int line, uint64_t symAddr )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const auto& symMap = m_worker.GetSymbolMap();
|
uint64_t baseAddr = 0;
|
||||||
auto sit = symMap.find( symAddr );
|
if( m_worker.HasSymbolCode( symAddr ) )
|
||||||
auto baseAddr = symAddr;
|
{
|
||||||
uint32_t symlen = 0;
|
baseAddr = symAddr;
|
||||||
if( sit != symMap.end() ) symlen = sit->second.size.Val();
|
}
|
||||||
if( symlen == 0 )
|
else
|
||||||
{
|
{
|
||||||
const auto parentAddr = m_worker.GetSymbolForAddress( symAddr );
|
const auto parentAddr = m_worker.GetSymbolForAddress( symAddr );
|
||||||
if( parentAddr != 0 )
|
if( parentAddr != 0 )
|
||||||
{
|
{
|
||||||
auto pit = symMap.find( parentAddr );
|
if( m_worker.HasSymbolCode( parentAddr ) )
|
||||||
if( pit != symMap.end() ) baseAddr = parentAddr;
|
{
|
||||||
|
baseAddr = parentAddr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( symlen != 0 || line != 0 )
|
}
|
||||||
|
if( baseAddr != 0 || line != 0 )
|
||||||
{
|
{
|
||||||
ViewSymbol( fileName, line, baseAddr, symAddr );
|
ViewSymbol( fileName, line, baseAddr, symAddr );
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user