mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Display target location for local jumps.
This commit is contained in:
parent
a763991a00
commit
e34d79c0c7
@ -3733,6 +3733,21 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
||||
if( jumpBase == m_baseAddr )
|
||||
{
|
||||
uint32_t srcline;
|
||||
const auto srcidx = worker.GetLocationForAddress( line.jumpAddr, srcline );
|
||||
if( srcline != 0 )
|
||||
{
|
||||
const auto fileName = worker.GetString( srcidx );
|
||||
const auto fileColor = GetHsvColor( srcidx.Idx(), 0 );
|
||||
TextDisabledUnformatted( "Target location:" );
|
||||
ImGui::SameLine();
|
||||
SmallColorBox( fileColor );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s:%i", fileName, srcline );
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::Separator();
|
||||
}
|
||||
@ -3857,6 +3872,21 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
||||
if( jumpBase == m_baseAddr )
|
||||
{
|
||||
uint32_t srcline;
|
||||
const auto srcidx = worker.GetLocationForAddress( line.jumpAddr, srcline );
|
||||
if( srcline != 0 )
|
||||
{
|
||||
const auto fileName = worker.GetString( srcidx );
|
||||
const auto fileColor = GetHsvColor( srcidx.Idx(), 0 );
|
||||
TextDisabledUnformatted( "Target location:" );
|
||||
ImGui::SameLine();
|
||||
SmallColorBox( fileColor );
|
||||
ImGui::SameLine();
|
||||
ImGui::Text( "%s:%i", fileName, srcline );
|
||||
}
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
SetFont();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user