diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-06-16 22:46:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-06-16 22:46:35 (GMT) |
commit | 23c7cd436e2ec980a68e6d12a6d8a750e357763c (patch) | |
tree | 0c27434a3ab3946e9b4766ae8ebe28ab399d9d84 /src/arch/instruction.c | |
parent | df1f4c4e1a5bb929f4345b1273d16558c0ba77de (diff) |
Made links between lines of code (x86 only).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@79 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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); + +} |