From 70dd37bbea133a97211a34ee9386c840c3a1deca Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 12 Oct 2022 00:45:05 +0200 Subject: [PATCH] Display local call stack for assembly lines. --- server/TracySourceView.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index dde7ce04..e63b980d 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -3769,6 +3769,20 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr UnsetFont(); } } + const auto frame = worker.GetCallstackFrame( worker.PackPointer( line.addr ) ); + if( frame && frame->size > 1 ) + { + ImGui::Separator(); + TextDisabledUnformatted( "Local call stack:" ); + for( uint8_t i=0; isize; i++ ) + { + ImGui::TextDisabled( "%i.", i+1 ); + ImGui::SameLine(); + ImGui::Text( "%s", worker.GetString( frame->data[i].name ) ); + ImGui::SameLine(); + ImGui::TextDisabled( "%s:%i", worker.GetString( frame->data[i].file ), frame->data[i].line ); + } + } ImGui::EndTooltip(); SetFont(); if( ImGui::IsItemClicked( 0 ) || ImGui::IsItemClicked( 1 ) )