From afb9bdce86d7ce2e664357c61cbcab9dec73d3cd Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 19 Apr 2020 15:54:43 +0200 Subject: [PATCH] Store instruction lengths. --- server/TracySourceView.cpp | 2 +- server/TracySourceView.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 6bef0b96..c7396500 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -250,7 +250,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker ) m_jumpOut.emplace( op.address ); } } - m_asm.emplace_back( AsmLine { op.address, jumpAddr, op.mnemonic, op.op_str } ); + m_asm.emplace_back( AsmLine { op.address, jumpAddr, op.mnemonic, op.op_str, (uint8_t)op.size } ); const auto mLen = strlen( op.mnemonic ); if( mLen > mLenMax ) mLenMax = mLen; diff --git a/server/TracySourceView.hpp b/server/TracySourceView.hpp index f0f4e0a8..34e3bdb3 100644 --- a/server/TracySourceView.hpp +++ b/server/TracySourceView.hpp @@ -29,6 +29,7 @@ class SourceView uint64_t jumpAddr; std::string mnemonic; std::string operands; + uint8_t len; }; struct JumpData