diff options
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r-- | src/arch/instruction.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index 6bb10e8..2d1836b 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -700,10 +700,25 @@ void g_arch_instruction_print(const GArchInstruction *instr, GCodeBuffer *buffer GDecInstruction *g_arch_instruction_decompile(const GArchInstruction *instr, GDecContext *ctx) { GDecInstruction *result; /* Instruction à retourner */ + GDecInstruction *list; /* Instructions décompilées */ if (instr->decomp != NULL) + { result = instr->decomp(instr, ctx); + if (result != NULL) + { + list = g_dec_context_get_decomp_instrs(ctx); + + if (list == NULL) list = result; + else g_dec_instruction_add_to_list(&list, result); + + g_dec_context_set_decomp_instrs(ctx, list); + + } + + } + else result = NULL; |