Add space for register data in each asm line.

This commit is contained in:
Bartosz Taudul 2020-05-01 16:33:09 +02:00
parent bb4b08e8cf
commit 8b2b2f650f
2 changed files with 9 additions and 0 deletions

View File

@ -716,6 +716,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
}
cs_close( &handle );
m_codeLen = len;
ResetAsm();
return true;
}
@ -2706,4 +2707,9 @@ void SourceView::SelectMicroArchitecture( const char* moniker )
assert( idx != MicroArchitectureNum );
}
void SourceView::ResetAsm()
{
for( auto& line : m_asm ) memset( line.regData, 0, sizeof( line.regData ) );
}
}

View File

@ -98,6 +98,7 @@ private:
{
RegsX86 writeX86[20];
};
uint16_t regData[20];
};
enum { AsmLineSize = sizeof( AsmLine ) };
@ -151,6 +152,8 @@ private:
TokenColor IdentifyToken( const char*& begin, const char* end );
std::vector<Token> Tokenize( const char* begin, const char* end );
void ResetAsm();
struct TokenizerState
{
void Reset()