Merge branch 'develop' of github.com:zyantific/zyan-disassembler-engine into develop

This commit is contained in:
flobernd 2016-11-29 11:47:32 +01:00
commit e926c26d6e
3 changed files with 16280 additions and 5404 deletions

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <inttypes.h>
#include <Zydis/Zydis.h> #include <Zydis/Zydis.h>
#include "FormatHelper.h" #include "FormatHelper.h"
@ -155,7 +156,7 @@ static ZydisStatus ZydisFormatterFormatOperandImm(ZydisInstructionFormatter* for
{ {
// The @c ZydisFormatterFormatMnemonic sinals us to omit the immediate (condition-code) // The @c ZydisFormatterFormatMnemonic sinals us to omit the immediate (condition-code)
// operand, because it got replaced by the alias-mnemonic // operand, because it got replaced by the alias-mnemonic
if ((int)info->userData == 1) if ((uintptr_t)info->userData == 1)
{ {
// The formatter will automatically omit the operand, if the buffer remains unchanged // The formatter will automatically omit the operand, if the buffer remains unchanged
// after the callback returns // after the callback returns
@ -201,7 +202,7 @@ void disassembleBuffer(uint8_t* data, size_t length, bool installHooks)
char buffer[256]; char buffer[256];
while (ZYDIS_SUCCESS(ZydisDecoderDecodeNextInstruction(&decoder, &info))) while (ZYDIS_SUCCESS(ZydisDecoderDecodeNextInstruction(&decoder, &info)))
{ {
printf("%016llX ", info.instrAddress); printf("%016" PRIx64 " ", info.instrAddress);
if (info.instrFlags & ZYDIS_INSTRFLAG_ERROR_MASK) if (info.instrFlags & ZYDIS_INSTRFLAG_ERROR_MASK)
{ {
printf(" db %02x\n", info.data[0]); printf(" db %02x\n", info.data[0]);

View File

@ -87,7 +87,7 @@ typedef uint8_t ZydisFormatterAddressFormat;
/** /**
* @brief Values that represent address-formats. * @brief Values that represent address-formats.
*/ */
enum ZydisFormatterAddressFormat enum ZydisFormatterAddressFormat_
{ {
/** /**
* @brief Currently defaults to @c ZYDIS_FORMATTER_ADDR_ABSOLUTE. * @brief Currently defaults to @c ZYDIS_FORMATTER_ADDR_ABSOLUTE.