1
0
mirror of synced 2025-02-20 04:01:01 +01:00

ui/ux: Put capstone into SKIPDATA mode to always disassemble everything

If invalid data is reached, instead of stopping it will now insert a `.byte 0x00, 0x00, 0x00, 0x00` "instruction"
This commit is contained in:
WerWolv 2021-05-23 23:04:20 +02:00
parent 1aa21b8a2d
commit 7cca646e3f

View File

@ -53,6 +53,8 @@ namespace hex {
if (cs_open(Disassembler::toCapstoneArchictecture(this->m_architecture), mode, &capstoneHandle) == CS_ERR_OK) {
cs_option(capstoneHandle, CS_OPT_SKIPDATA, CS_OPT_ON);
auto provider = SharedData::currentProvider;
std::vector<u8> buffer(2048, 0x00);
for (u64 address = 0; address < (this->m_codeRegion[1] - this->m_codeRegion[0] + 1); address += 2048) {