diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 3b0246c5..844c60d4 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -3909,12 +3909,14 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr uint32_t jumpOffset; uint64_t jumpBase; const char* jumpName = nullptr; + const char* normalized = nullptr; if( line.jumpAddr != 0 ) { jumpOffset = 0; jumpBase = worker.GetSymbolForAddress( line.jumpAddr, jumpOffset ); auto jumpSym = jumpBase == 0 ? worker.GetSymbolData( line.jumpAddr ) : worker.GetSymbolData( jumpBase ); if( jumpSym ) jumpName = worker.GetString( jumpSym->name ); + if( jumpName ) normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName; } if( ImGui::IsItemHovered() ) @@ -3938,7 +3940,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr TextDisabledUnformatted( "External target:" ); } ImGui::SameLine(); - ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset ); + ImGui::Text( "%s+%" PRIu32, normalized, jumpOffset ); if( jumpBase == m_baseAddr ) { uint32_t srcline; @@ -4077,7 +4079,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr TextDisabledUnformatted( "External target:" ); } ImGui::SameLine(); - ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset ); + ImGui::Text( "%s+%" PRIu32, normalized, jumpOffset ); if( jumpBase == m_baseAddr ) { uint32_t srcline; @@ -4239,7 +4241,6 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr if( jumpName ) { - const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName; ImGui::SameLine(); ImGui::Spacing(); ImGui::SameLine();