diff options
Diffstat (limited to 'src/analysis/disass/links.c')
-rw-r--r-- | src/analysis/disass/links.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/analysis/disass/links.c b/src/analysis/disass/links.c index 294274f..9a6749e 100644 --- a/src/analysis/disass/links.c +++ b/src/analysis/disass/links.c @@ -52,8 +52,7 @@ static void convert_immediate_into_target(GArchInstruction *, size_t, GBinFormat void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev) { bool has_src; /* Présence de sources ? */ - GArchInstruction **others; /* Instructions diverses liées */ - InstructionLinkType *types; /* Types de lien existants */ + instr_link_t *others; /* Instructions diverses liées */ size_t count; /* Nbre de sources affichées */ size_t i; /* Boucle de parcours */ @@ -85,14 +84,14 @@ void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev) */ g_arch_instruction_rlock_dest(prev); - count = g_arch_instruction_get_destinations(prev, &others, &types); + count = g_arch_instruction_get_destinations(prev, &others); for (i = 0; i < count; i++) { - if (types[i] == ILT_EXEC_FLOW) break; - if (types[i] == ILT_JUMP) break; - if (types[i] == ILT_CASE_JUMP) break; - if (types[i] == ILT_LOOP) break; + if (others[i].type == ILT_EXEC_FLOW) break; + if (others[i].type == ILT_JUMP) break; + if (others[i].type == ILT_CASE_JUMP) break; + if (others[i].type == ILT_LOOP) break; } g_arch_instruction_runlock_dest(prev); @@ -104,12 +103,12 @@ void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev) */ g_arch_instruction_rlock_src(instr); - count = g_arch_instruction_get_sources(instr, &others, &types); + count = g_arch_instruction_get_sources(instr, &others); for (i = 0; i < count; i++) { - if (others[i] == prev && types[i] == ILT_JUMP_IF_TRUE) break; - if (others[i] == prev && types[i] == ILT_JUMP_IF_FALSE) break; + if (others[i].linked == prev && others[i].type == ILT_JUMP_IF_TRUE) break; + if (others[i].linked == prev && others[i].type == ILT_JUMP_IF_FALSE) break; } g_arch_instruction_runlock_src(instr); |