diff options
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r-- | src/arch/instruction.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index c8640b4..a96f0e4 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -167,6 +167,51 @@ void g_arch_instruction_append_suffix(GArchInstruction *instr, const char *suffi /****************************************************************************** * * +* Paramètres : instr = instruction quelconque à modifier. * +* post = fonction à appeler sur commande. * +* * +* Description : Définit une fonction de post-traitement après désassemblage. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_arch_instruction_set_post_prod_function(GArchInstruction *instr, instr_post_prod_fc post) +{ + instr->post_prod = post; + +} + + +/****************************************************************************** +* * +* Paramètres : instr = instruction quelconque à traiter. * +* data = données éventuelles associées à l'opération. * +* * +* Description : Complète un désassemblage accompli pour une instruction. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_arch_instruction_call_post_prod_function(GArchInstruction *instr, void *data) +{ + if (instr->post_prod != NULL) + instr->post_prod(instr, data); + +} + + + + + + +/****************************************************************************** +* * * Paramètres : instr = instruction quelconque à modifier. * * address = adresse virtuelle et/ou position physique. * * length = taille de l'instruction. * @@ -321,7 +366,10 @@ void g_arch_instruction_replace_operand(GArchInstruction *instr, GArchOperand *n break; if (i < instr->operands_count) + { + g_object_unref(G_OBJECT(instr->operands[i])); instr->operands[i] = new; + } } |