Skip to content

Commit c02dd23

Browse files
committed
Make compatible with Zydis 4
1 parent 02cc5e3 commit c02dd23

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/e9tool/e9x86_64.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ void e9tool::getInstrInfo(const ELF *elf, const Instr *I, InstrInfo *info,
152152
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT];
153153

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

0 commit comments

Comments
 (0)