diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-01-09 20:36:26 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-01-09 20:36:26 (GMT) |
commit | 7cc35e17f3af39ad9a23bff93c42d86f73dd1001 (patch) | |
tree | 13bf4ab0af8c277b5503720bb45f6a753206d241 /src/arch/instruction.c | |
parent | dcd03173f71b09f38238f50dfcf4c1db0c014c4c (diff) |
Restored some parts of the decompilation process using the new basic blocks.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@320 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r-- | src/arch/instruction.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c index b460b37..06d3e71 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -448,6 +448,35 @@ size_t g_arch_instruction_get_destinations(const GArchInstruction *instr, GArchI } +/****************************************************************************** +* * +* Paramètres : instr = instruction dont les informations sont à consulter. * +* type = type de lien recherché. * +* * +* Description : Fournit la destination d'une instruction et d'un type donné. * +* * +* Retour : Instruction de destination trouvée ou NULL. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GArchInstruction *g_arch_instruction_get_given_destination(const GArchInstruction *instr, InstructionLinkType type) +{ + GArchInstruction *result; /* Résultat à remonter */ + size_t i; /* Boucle de parcours */ + + result = NULL; + + for (i = 0; i < instr->to_count && result == NULL; i++) + if (instr->links_type[i] == type) + result = instr->to[i]; + + return result; + +} + + /* ---------------------------------------------------------------------------------- */ /* CONVERSIONS DU FORMAT DES INSTRUCTIONS */ |