From 0376376b838ad7f39956146e42eed45197cdb1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20H=C3=B6ner?= Date: Sat, 8 Apr 2017 19:36:16 +0200 Subject: [PATCH] Temp. disabled encoder, updated CMake defaults --- CMakeLists.txt | 20 ++++++++++---------- include/Zydis/Zydis.h | 1 + tools/ZydisDisasm.c | 2 ++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dbe067..72de30b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,21 +6,21 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) option(ZYDIS_BUILD_SHARED_LIBS "Build shared libraries rather than static ones" - FALSE) + OFF) option(ZYDIS_FORCE_SHARED_CRT - "Forces shared linkage against the CRT even when building a static library" - FALSE) + "Forces shared linkage against the CRT even when building a static library. MSVC only." + OFF) option(ZYDIS_FEATURE_IMPLICITLY_USED_REGISTERS "Include information about implicitly used registers" - TRUE) + OFF) option(ZYDIS_FEATURE_AFFECTED_FLAGS "Include information about affected flags" - TRUE) + OFF) option(ZYDIS_FEATURE_CPUID "Include information about CPUID feature-flags" - FALSE) -option(ZYDIS_BUILD_EXAMPLES "Build examples" TRUE) -option(ZYDIS_BUILD_TOOLS "Build tools" TRUE) + OFF) +option(ZYDIS_BUILD_EXAMPLES "Build examples" ON) +option(ZYDIS_BUILD_TOOLS "Build tools" ON) if (NOT CONFIGURED_ONCE) if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR @@ -49,7 +49,7 @@ endif () # Library set(headers "include/Zydis/Decoder.h" - "include/Zydis/Encoder.h" + #"include/Zydis/Encoder.h" "include/Zydis/Defines.h" "include/Zydis/Formatter.h" "include/Zydis/InstructionInfo.h" @@ -62,7 +62,7 @@ set(headers "include/Zydis/Internal/InstructionTable.h") set(sources "src/Decoder.c" - "src/Encoder.c" + #"src/Encoder.c" "src/Formatter.c" "src/InstructionTable.c" "src/Mnemonic.c" diff --git a/include/Zydis/Zydis.h b/include/Zydis/Zydis.h index a434f40..5afc7a4 100644 --- a/include/Zydis/Zydis.h +++ b/include/Zydis/Zydis.h @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/tools/ZydisDisasm.c b/tools/ZydisDisasm.c index 8cca3bf..fc583b1 100644 --- a/tools/ZydisDisasm.c +++ b/tools/ZydisDisasm.c @@ -95,6 +95,7 @@ int main(int argc, char** argv) // TODO: Remove // DEBUG CODE START +#if 0 for (size_t i = 0; i < info.length; ++i) { printf("%02X ", *(readBuf + readOffs + i)); @@ -115,6 +116,7 @@ int main(int argc, char** argv) putchar('\n'); ZYDIS_ASSERT(encBufferSize == info.length); ZYDIS_ASSERT(!memcmp(encBuffer, readBuf + readOffs, encBufferSize)); +#endif // DEBUG CODE END readOffs += info.length;