mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 06:03:51 +00:00
Get location for address from callstack frame data.
This commit is contained in:
parent
4d0768ba9d
commit
ac6902501a
@ -2587,16 +2587,17 @@ uint64_t Worker::GetInlineSymbolForAddress( uint64_t address ) const
|
|||||||
|
|
||||||
StringIdx Worker::GetLocationForAddress( uint64_t address, uint32_t& line ) const
|
StringIdx Worker::GetLocationForAddress( uint64_t address, uint32_t& line ) const
|
||||||
{
|
{
|
||||||
auto it = m_data.codeAddressToLocation.find( address );
|
auto frame = GetCallstackFrame( PackPointer( address ) );
|
||||||
if( it == m_data.codeAddressToLocation.end() )
|
if( !frame )
|
||||||
{
|
{
|
||||||
line = 0;
|
line = 0;
|
||||||
return StringIdx();
|
return StringIdx();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const auto idx = UnpackFileLine( it->second, line );
|
auto subFrame = frame->data[0];
|
||||||
return StringIdx( idx );
|
line = subFrame.line;
|
||||||
|
return subFrame.file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user