mirror of
https://github.com/wolfpld/tracy
synced 2025-05-02 21:53:52 +00:00
Display disassembly of inlined symbols.
This commit is contained in:
parent
720ed0460b
commit
31a1517d2f
@ -11373,6 +11373,7 @@ void View::DrawStatistics()
|
|||||||
uint32_t line = 0;
|
uint32_t line = 0;
|
||||||
bool isInline = false;
|
bool isInline = false;
|
||||||
uint32_t symlen = 0;
|
uint32_t symlen = 0;
|
||||||
|
auto codeAddr = v.symAddr;
|
||||||
|
|
||||||
auto sit = symMap.find( v.symAddr );
|
auto sit = symMap.find( v.symAddr );
|
||||||
if( sit != symMap.end() )
|
if( sit != symMap.end() )
|
||||||
@ -11398,6 +11399,21 @@ void View::DrawStatistics()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( symlen == 0 )
|
||||||
|
{
|
||||||
|
uint32_t offset;
|
||||||
|
const auto parentAddr = m_worker.GetSymbolForAddress( v.symAddr, offset );
|
||||||
|
if( parentAddr != 0 )
|
||||||
|
{
|
||||||
|
auto pit = symMap.find( parentAddr );
|
||||||
|
if( pit != symMap.end() )
|
||||||
|
{
|
||||||
|
codeAddr = parentAddr;
|
||||||
|
symlen = pit->second.size.Val();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( isInline )
|
if( isInline )
|
||||||
{
|
{
|
||||||
TextDisabledUnformatted( ICON_FA_CARET_RIGHT );
|
TextDisabledUnformatted( ICON_FA_CARET_RIGHT );
|
||||||
@ -11437,14 +11453,14 @@ void View::DrawStatistics()
|
|||||||
{
|
{
|
||||||
if( SourceFileValid( file, m_worker.GetCaptureTime() ) )
|
if( SourceFileValid( file, m_worker.GetCaptureTime() ) )
|
||||||
{
|
{
|
||||||
SetTextEditorFile( file, line, v.symAddr );
|
SetTextEditorFile( file, line, codeAddr, v.symAddr );
|
||||||
}
|
}
|
||||||
else if( symlen != 0 )
|
else if( symlen != 0 )
|
||||||
{
|
{
|
||||||
uint32_t len;
|
uint32_t len;
|
||||||
if( m_worker.GetSymbolCode( v.symAddr, len ) )
|
if( m_worker.GetSymbolCode( codeAddr, len ) )
|
||||||
{
|
{
|
||||||
SetTextEditorFile( nullptr, 0, v.symAddr );
|
SetTextEditorFile( nullptr, 0, codeAddr, v.symAddr );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -11479,7 +11495,15 @@ void View::DrawStatistics()
|
|||||||
TextDisabledUnformatted( buf );
|
TextDisabledUnformatted( buf );
|
||||||
}
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
if( symlen != 0 ) TextDisabledUnformatted( MemSizeToString( symlen ) );
|
if( symlen != 0 )
|
||||||
|
{
|
||||||
|
if( isInline )
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "<" );
|
||||||
|
ImGui::SameLine();
|
||||||
|
}
|
||||||
|
TextDisabledUnformatted( MemSizeToString( symlen ) );
|
||||||
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user