diff options
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r-- | src/arch/instruction.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index 21e72b7..69644dc 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -202,6 +202,31 @@ void g_arch_instruction_attach_extra_operand(GArchInstruction *instr, GArchOpera /****************************************************************************** * * +* Paramètres : instr = instance à mettre à jour. * +* index = indice de l'opérande concernée. * +* * +* Description : Fournit un opérande donné d'une instruction. * +* * +* Retour : Opérande trouvée ou NULL si aucune. * +* * +* Remarques : - * +* * +******************************************************************************/ + +const GArchOperand *g_arch_instruction_get_operand(GArchInstruction *instr, size_t index) +{ + const GArchOperand *result; /* Opérande à retourner */ + + if (index >= instr->operands_count) result = NULL; + else result = instr->operands[index]; + + return result; + +} + + +/****************************************************************************** +* * * Paramètres : instr = instance à mettre à jour. * * opererand = instruction à venir dissocier. * * * @@ -276,3 +301,23 @@ char *g_arch_instruction_get_text(const GArchInstruction *instr, const exe_forma return result; } + + +/****************************************************************************** +* * +* Paramètres : instr = instruction à consulter. * +* addr = eventuelle adresse associée à faire connaître. [OUT] * +* * +* Description : Informe sur une éventuelle référence à une autre instruction.* +* * +* Retour : Type de lien trouvé ou ILT_NONE si aucun. * +* * +* Remarques : - * +* * +******************************************************************************/ + +InstructionLinkType g_arch_instruction_get_link(const GArchInstruction *instr, vmpa_t *addr) +{ + return instr->get_link(instr, addr); + +} |