Store instruction lengths.

This commit is contained in:
Bartosz Taudul 2020-04-19 15:54:43 +02:00
parent 421f0895b7
commit afb9bdce86
2 changed files with 2 additions and 1 deletions

View File

@ -250,7 +250,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
m_jumpOut.emplace( op.address ); 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 ); const auto mLen = strlen( op.mnemonic );
if( mLen > mLenMax ) mLenMax = mLen; if( mLen > mLenMax ) mLenMax = mLen;

View File

@ -29,6 +29,7 @@ class SourceView
uint64_t jumpAddr; uint64_t jumpAddr;
std::string mnemonic; std::string mnemonic;
std::string operands; std::string operands;
uint8_t len;
}; };
struct JumpData struct JumpData