From 78a0773f385922ec4d947014cc7efb4453abd521 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 4 Apr 2020 13:51:55 +0200 Subject: [PATCH] Collect jumps outside symbol. --- server/TracySourceView.cpp | 5 +++++ server/TracySourceView.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 2f05e9c1..6ad6d293 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -106,6 +106,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker ) { m_asm.clear(); m_jumpTable.clear(); + m_jumpOut.clear(); m_maxJumpLevel = 0; if( symAddr == 0 ) return false; const auto arch = worker.GetCpuArch(); @@ -197,6 +198,10 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker ) it->second.source.emplace_back( op.address ); } } + else + { + m_jumpOut.emplace( op.address ); + } } m_asm.emplace_back( AsmLine { op.address, jumpAddr, op.mnemonic, op.op_str } ); } diff --git a/server/TracySourceView.hpp b/server/TracySourceView.hpp index 26fac793..f1d1d256 100644 --- a/server/TracySourceView.hpp +++ b/server/TracySourceView.hpp @@ -72,6 +72,7 @@ private: std::vector m_asm; unordered_flat_map m_jumpTable; + unordered_flat_set m_jumpOut; int m_maxJumpLevel; bool m_showJumps; };