From 2b8cf5d13216876c08d3a2ae2534a2981a130591 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 2 Apr 2020 02:17:22 +0200 Subject: [PATCH] Add addressess accessor. --- server/TracyWorker.cpp | 13 +++++++++++++ server/TracyWorker.hpp | 1 + 2 files changed, 14 insertions(+) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 5f71ad00..4360e218 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -2341,6 +2341,19 @@ StringIdx Worker::GetLocationForAddress( uint64_t address, uint32_t& line ) cons } } +const Vector* Worker::GetAddressesForLocation( uint32_t fileStringIdx, uint32_t line ) const +{ + auto it = m_data.locationCodeAddressList.find( PackFileLine( fileStringIdx, line ) ); + if( it == m_data.locationCodeAddressList.end() ) + { + return nullptr; + } + else + { + return &it->second; + } +} + int64_t Worker::GetZoneEnd( const ZoneEvent& ev ) { auto ptr = &ev; diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 524d96d5..af7e6044 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -438,6 +438,7 @@ public: const char* GetSymbolCode( uint64_t sym, uint32_t& len ) const; uint64_t GetSymbolForAddress( uint64_t address, uint32_t& offset ) const; StringIdx GetLocationForAddress( uint64_t address, uint32_t& line ) const; + const Vector* GetAddressesForLocation( uint32_t fileStringIdx, uint32_t line ) const; #ifndef TRACY_NO_STATISTICS const VarArray& GetParentCallstack( uint32_t idx ) const { return *m_data.parentCallstackPayload[idx]; }