Skip to content

Commit

Permalink
Make compatible with Zydis 4
Browse files Browse the repository at this point in the history
  • Loading branch information
McSinyx committed Nov 18, 2024
1 parent 02cc5e3 commit c02dd23
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/e9tool/e9x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ void e9tool::getInstrInfo(const ELF *elf, const Instr *I, InstrInfo *info,
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT];

ZyanStatus result = ZydisDecoderDecodeFull(&decoder,
elf->data + I->offset, I->size, D, operands, ZYDIS_MAX_OPERAND_COUNT,
0);
elf->data + I->offset, I->size, D, operands);
if (!ZYAN_SUCCESS(result) || I->size != D->length ||
D->operand_count > sizeof(info->op) / sizeof(info->op[0]))
error("failed to decompress instruction at address 0x%lx; decode "
Expand Down Expand Up @@ -336,7 +335,7 @@ void e9tool::getInstrInfo(const ELF *elf, const Instr *I, InstrInfo *info,
info->string.section = elf->strs + shdr->sh_name;
result = ZydisFormatterFormatInstruction(&formatter, D, operands,
D->operand_count_visible, info->string.instr,
sizeof(info->string.instr)-1, I->address);
sizeof(info->string.instr)-1, I->address, ZYAN_NULL);
if (!ZYAN_SUCCESS(result))
error("failed to decompress instruction at address 0x%lx; "
"formatting failed", I->address);
Expand Down

0 comments on commit c02dd23

Please sign in to comment.