mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Normalize jump names in assembly lines.
This commit is contained in:
parent
04aebb090b
commit
d3cb8ccef2
@ -4204,14 +4204,18 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
|
|
||||||
if( jumpName )
|
if( jumpName )
|
||||||
{
|
{
|
||||||
|
const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName;
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( jumpBase == m_baseAddr )
|
if( jumpBase == m_baseAddr )
|
||||||
{
|
{
|
||||||
ImGui::TextDisabled( " -> [%s+%" PRIu32"]", jumpName, jumpOffset );
|
ImGui::TextDisabled( " -> [%s+%" PRIu32"]", normalized, jumpOffset );
|
||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
|
UnsetFont();
|
||||||
|
TooltipNormalizedName( jumpName, normalized );
|
||||||
|
SetFont();
|
||||||
m_highlightAddr = line.jumpAddr;
|
m_highlightAddr = line.jumpAddr;
|
||||||
if( ImGui::IsItemClicked() )
|
if( ImGui::IsItemClicked() )
|
||||||
{
|
{
|
||||||
@ -4223,10 +4227,16 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGui::TextDisabled( " [%s+%" PRIu32"]", jumpName, jumpOffset );
|
ImGui::TextDisabled( " [%s+%" PRIu32"]", normalized, jumpOffset );
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
|
{
|
||||||
|
UnsetFont();
|
||||||
|
TooltipNormalizedName( jumpName, normalized );
|
||||||
|
SetFont();
|
||||||
if( ImGui::IsItemClicked() ) jumpOut = line.jumpAddr;
|
if( ImGui::IsItemClicked() ) jumpOut = line.jumpAddr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( lineHovered )
|
if( lineHovered )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user