diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-10-11 22:47:28 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-10-11 22:47:28 +0300 |
commit | ac6902501addf1067f14e22358102805b09a2a25 (patch) | |
tree | 39e97f12a3a5722d245b463431d9bd6f466f2e8d /server | |
parent | 4d0768ba9de086250d0d37423896f172dab93ee8 (diff) |
Get location for address from callstack frame data.
Diffstat (limited to 'server')
-rw-r--r-- | server/TracyWorker.cpp | 9 |
1 files 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; } } |