From a5998adf832d2b997ebdd88a019ad0380b331cf6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 15 Aug 2022 22:16:05 +0200 Subject: [PATCH] Normalize function name in assembly line location popup. --- server/TracySourceView.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index e9d26b41..347aca83 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -3615,9 +3615,17 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr const auto symData = worker.GetSymbolData( symAddr ); if( symData ) { - TextFocused( "Function:", worker.GetString( symData->name ) ); + const auto symName = worker.GetString( symData->name ); + const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, symName ) : symName; + TextFocused( "Function:", normalized ); ImGui::SameLine(); ImGui::TextDisabled( "(0x%" PRIx64 ")", symAddr ); + if( normalized != symName && strcmp( normalized, symName ) != 0 ) + { + ImGui::PushFont( m_smallFont ); + TextDisabledUnformatted( symName ); + ImGui::PopFont(); + } } } }