From 41e423407fc5be965e08a6f907467ef4b058c6f5 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 23 Apr 2011 06:40:42 +0000 Subject: [PATCH] Return "db" when more convenient for the moment --- src/arch/i386.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/arch/i386.h b/src/arch/i386.h index 09e2f84..432ff45 100644 --- a/src/arch/i386.h +++ b/src/arch/i386.h @@ -40,10 +40,18 @@ static int _i386_decode(ArchPlugin * plugin, ArchInstructionCall * call) if(helper->read(helper->arch, &opcode, sizeof(opcode)) != sizeof(opcode)) return -1; + call->operands[0].type = AOT_NONE; + call->operands[1].type = AOT_NONE; + call->operands[2].type = AOT_NONE; if((ai = helper->get_instruction_by_opcode(helper->arch, 8, opcode)) == NULL) - /* FIXME return "db" instead */ - return -1; + { + /* FIXME check if it's a longer instruction */ + call->name = "db"; + call->operands[0].type = AO_IMMEDIATE(0, 0, 8); + call->operands[0].value.immediate.value = opcode; + return 0; + } call->name = ai->name; return 0; }