From ac6902501addf1067f14e22358102805b09a2a25 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 11 Oct 2022 21:47:28 +0200 Subject: [PATCH] Get location for address from callstack frame data. --- server/TracyWorker.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index a0956738..ea07cef7 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -2587,16 +2587,17 @@ uint64_t Worker::GetInlineSymbolForAddress( uint64_t address ) const StringIdx Worker::GetLocationForAddress( uint64_t address, uint32_t& line ) const { - auto it = m_data.codeAddressToLocation.find( address ); - if( it == m_data.codeAddressToLocation.end() ) + auto frame = GetCallstackFrame( PackPointer( address ) ); + if( !frame ) { line = 0; return StringIdx(); } else { - const auto idx = UnpackFileLine( it->second, line ); - return StringIdx( idx ); + auto subFrame = frame->data[0]; + line = subFrame.line; + return subFrame.file; } }