diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 468b6285..349583c3 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -593,6 +593,35 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker ) } } m_asm.emplace_back( AsmLine { op.address, jumpAddr, op.mnemonic, op.op_str, (uint8_t)op.size, leaData, std::move( params ) } ); + + auto& entry = m_asm.back(); + cs_regs read, write; + uint8_t rcnt, wcnt; + cs_regs_access( handle, &op, read, &rcnt, write, &wcnt ); + int idx; + switch( m_cpuArch ) + { + case CpuArchX86: + case CpuArchX64: + assert( rcnt < sizeof( entry.readX86 ) ); + assert( wcnt < sizeof( entry.writeX86 ) ); + idx = 0; + for( int i=0; i mLenMax ) mLenMax = mLen; if( op.size > bytesMax ) bytesMax = op.size; diff --git a/server/TracySourceView.hpp b/server/TracySourceView.hpp index c76a3af7..93afdeb9 100644 --- a/server/TracySourceView.hpp +++ b/server/TracySourceView.hpp @@ -89,8 +89,18 @@ private: uint8_t len; LeaData leaData; std::vector params; + union + { + RegsX86 readX86[12]; + }; + union + { + RegsX86 writeX86[20]; + }; }; + enum { AsmLineSize = sizeof( AsmLine ) }; + struct JumpData { uint64_t min;