mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +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::SameLine();
|
||||||
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
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();
|
ImGui::Separator();
|
||||||
}
|
}
|
||||||
@ -3857,6 +3872,21 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
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();
|
ImGui::EndTooltip();
|
||||||
SetFont();
|
SetFont();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user