diff options
Diffstat (limited to 'src/analysis/disass')
-rw-r--r-- | src/analysis/disass/links.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/analysis/disass/links.c b/src/analysis/disass/links.c index 0207d6b..ffdee36 100644 --- a/src/analysis/disass/links.c +++ b/src/analysis/disass/links.c @@ -30,6 +30,7 @@ #include "../../arch/instruction.h" #include "../../arch/raw.h" #include "../../arch/target.h" +#include "../../arch/targetableop.h" @@ -262,6 +263,7 @@ void establish_links_for_instruction(GArchInstruction *instr, GBinFormat *format size_t count; /* Nombre d'opérandes présents */ size_t i; /* Boucle de parcours */ GArchOperand *op; /* Opérande numérique en place */ + const mrange_t *range; /* Emplacement de l'instruction*/ vmpa2t addr; /* Localisation plus complète */ GArchInstruction *target; /* Instruction visée au final */ @@ -280,9 +282,12 @@ void establish_links_for_instruction(GArchInstruction *instr, GBinFormat *format convert_immediate_into_target(instr, i, format); op = _g_arch_instruction_get_operand(instr, i); - if (!G_IS_TARGET_OPERAND(op)) goto next_op; + if (!G_IS_TARGETABLE_OPERAND(op)) goto next_op; - g_target_operand_get_addr(G_TARGET_OPERAND(op), &addr); + range = g_arch_instruction_get_range(instr); + + if (!g_targetable_operand_get_addr(G_TARGETABLE_OPERAND(op), get_mrange_addr(range), format, proc, &addr)) + goto next_op; target = g_arch_processor_find_instr_by_address(proc, &addr); |