mirror of https://github.com/x64dbg/zydis
Temp. disabled encoder, updated CMake defaults
This commit is contained in:
parent
fda4f15c6d
commit
0376376b83
|
@ -6,21 +6,21 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
option(ZYDIS_BUILD_SHARED_LIBS
|
option(ZYDIS_BUILD_SHARED_LIBS
|
||||||
"Build shared libraries rather than static ones"
|
"Build shared libraries rather than static ones"
|
||||||
FALSE)
|
OFF)
|
||||||
option(ZYDIS_FORCE_SHARED_CRT
|
option(ZYDIS_FORCE_SHARED_CRT
|
||||||
"Forces shared linkage against the CRT even when building a static library"
|
"Forces shared linkage against the CRT even when building a static library. MSVC only."
|
||||||
FALSE)
|
OFF)
|
||||||
option(ZYDIS_FEATURE_IMPLICITLY_USED_REGISTERS
|
option(ZYDIS_FEATURE_IMPLICITLY_USED_REGISTERS
|
||||||
"Include information about implicitly used registers"
|
"Include information about implicitly used registers"
|
||||||
TRUE)
|
OFF)
|
||||||
option(ZYDIS_FEATURE_AFFECTED_FLAGS
|
option(ZYDIS_FEATURE_AFFECTED_FLAGS
|
||||||
"Include information about affected flags"
|
"Include information about affected flags"
|
||||||
TRUE)
|
OFF)
|
||||||
option(ZYDIS_FEATURE_CPUID
|
option(ZYDIS_FEATURE_CPUID
|
||||||
"Include information about CPUID feature-flags"
|
"Include information about CPUID feature-flags"
|
||||||
FALSE)
|
OFF)
|
||||||
option(ZYDIS_BUILD_EXAMPLES "Build examples" TRUE)
|
option(ZYDIS_BUILD_EXAMPLES "Build examples" ON)
|
||||||
option(ZYDIS_BUILD_TOOLS "Build tools" TRUE)
|
option(ZYDIS_BUILD_TOOLS "Build tools" ON)
|
||||||
|
|
||||||
if (NOT CONFIGURED_ONCE)
|
if (NOT CONFIGURED_ONCE)
|
||||||
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
|
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
|
||||||
|
@ -49,7 +49,7 @@ endif ()
|
||||||
# Library
|
# Library
|
||||||
set(headers
|
set(headers
|
||||||
"include/Zydis/Decoder.h"
|
"include/Zydis/Decoder.h"
|
||||||
"include/Zydis/Encoder.h"
|
#"include/Zydis/Encoder.h"
|
||||||
"include/Zydis/Defines.h"
|
"include/Zydis/Defines.h"
|
||||||
"include/Zydis/Formatter.h"
|
"include/Zydis/Formatter.h"
|
||||||
"include/Zydis/InstructionInfo.h"
|
"include/Zydis/InstructionInfo.h"
|
||||||
|
@ -62,7 +62,7 @@ set(headers
|
||||||
"include/Zydis/Internal/InstructionTable.h")
|
"include/Zydis/Internal/InstructionTable.h")
|
||||||
set(sources
|
set(sources
|
||||||
"src/Decoder.c"
|
"src/Decoder.c"
|
||||||
"src/Encoder.c"
|
#"src/Encoder.c"
|
||||||
"src/Formatter.c"
|
"src/Formatter.c"
|
||||||
"src/InstructionTable.c"
|
"src/InstructionTable.c"
|
||||||
"src/Mnemonic.c"
|
"src/Mnemonic.c"
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <Zydis/Decoder.h>
|
#include <Zydis/Decoder.h>
|
||||||
#include <Zydis/Formatter.h>
|
#include <Zydis/Formatter.h>
|
||||||
#include <Zydis/Encoder.h>
|
#include <Zydis/Encoder.h>
|
||||||
|
#include <Zydis/Utils.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -95,6 +95,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
// TODO: Remove
|
// TODO: Remove
|
||||||
// DEBUG CODE START
|
// DEBUG CODE START
|
||||||
|
#if 0
|
||||||
for (size_t i = 0; i < info.length; ++i)
|
for (size_t i = 0; i < info.length; ++i)
|
||||||
{
|
{
|
||||||
printf("%02X ", *(readBuf + readOffs + i));
|
printf("%02X ", *(readBuf + readOffs + i));
|
||||||
|
@ -115,6 +116,7 @@ int main(int argc, char** argv)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
ZYDIS_ASSERT(encBufferSize == info.length);
|
ZYDIS_ASSERT(encBufferSize == info.length);
|
||||||
ZYDIS_ASSERT(!memcmp(encBuffer, readBuf + readOffs, encBufferSize));
|
ZYDIS_ASSERT(!memcmp(encBuffer, readBuf + readOffs, encBufferSize));
|
||||||
|
#endif
|
||||||
// DEBUG CODE END
|
// DEBUG CODE END
|
||||||
|
|
||||||
readOffs += info.length;
|
readOffs += info.length;
|
||||||
|
|
Loading…
Reference in New Issue