summaryrefslogtreecommitdiff
path: root/plugins/libcsem/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/libcsem/exit.c')
-rw-r--r--plugins/libcsem/exit.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/libcsem/exit.c b/plugins/libcsem/exit.c
index 6695787..6a21d5f 100644
--- a/plugins/libcsem/exit.c
+++ b/plugins/libcsem/exit.c
@@ -52,9 +52,9 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c
const mrange_t *range; /* Emplacement du symbole */
GArchProcessor *proc; /* Architecture du binaire */
GArchInstruction *instr; /* Instruction de sortie */
- instr_link_t *sources; /* Instructions diverses liées */
size_t count; /* Nbre de sources affichées */
size_t i; /* Boucle de parcours */
+ instr_link_t *source; /* Instruction diverse liée */
format = G_BIN_FORMAT(g_loaded_binary_get_format(binary));
@@ -73,18 +73,21 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c
if (instr == NULL)
goto mokoear_not_found;
- g_arch_instruction_rlock_src(instr);
- count = g_arch_instruction_get_sources(instr, &sources);
+ g_arch_instruction_lock_src(instr);
+
+ count = g_arch_instruction_count_sources(instr);
for (i = 0; i < count; i++)
{
- if (sources[i].type != ILT_CALL) continue;
+ source = g_arch_instruction_get_source(instr, i);
+
+ if (source->type != ILT_CALL) continue;
- g_arch_instruction_set_flag(sources[i].linked, AIF_RETURN_POINT);
+ g_arch_instruction_set_flag(source->linked, AIF_RETURN_POINT);
}
- g_arch_instruction_runlock_src(instr);
+ g_arch_instruction_unlock_src(instr);
g_object_unref(G_OBJECT(instr));