Abstract capstone architectures

This allows to support older version of Capstone (example 4.0.1).

Should help with ubuntu building issues.
This commit is contained in:
Mary
2020-12-05 17:32:30 +01:00
parent 82c5bd528c
commit 45c29888b4
3 changed files with 70 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include "helpers/disassembler.hpp"
#include "views/view.hpp"
#include <capstone/capstone.h>
@@ -37,7 +38,7 @@ namespace hex {
u64 m_codeRegion[2] = { 0 };
bool m_shouldMatchSelection = false;
cs_arch m_architecture = CS_ARCH_ARM;
Architecture m_architecture = Architecture::ARM;
cs_mode m_modeBasicARM = cs_mode(0), m_modeExtraARM = cs_mode(0), m_modeBasicMIPS = cs_mode(0), m_modeBasicPPC = cs_mode(0), m_modeBasicX86 = cs_mode(0);
bool m_littleEndianMode = true, m_micoMode = false, m_sparcV9Mode = false;