summaryrefslogtreecommitdiff
path: root/plugins/libcsem
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-10-28 22:26:53 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-10-28 22:26:53 (GMT)
commit8c71b36d401b2473342daddcb9b7eb4b83ba3295 (patch)
tree13515f99f3e01fc2d1701189e500fa69763da7f9 /plugins/libcsem
parent2c70e3332b43bdcbe215081b697395d254418e48 (diff)
Optimized access to instruction sources and destinations.
Diffstat (limited to 'plugins/libcsem')
-rw-r--r--plugins/libcsem/exit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/libcsem/exit.c b/plugins/libcsem/exit.c
index aa3ca18..d26d4bf 100644
--- a/plugins/libcsem/exit.c
+++ b/plugins/libcsem/exit.c
@@ -49,8 +49,7 @@ 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 */
- GArchInstruction **sources; /* Instructions diverses liées */
- InstructionLinkType *types; /* Types de lien existants */
+ instr_link_t *sources; /* Instructions diverses liées */
size_t count; /* Nbre de sources affichées */
size_t i; /* Boucle de parcours */
@@ -69,13 +68,13 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c
instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range));
g_arch_instruction_rlock_src(instr);
- count = g_arch_instruction_get_sources(instr, &sources, &types);
+ count = g_arch_instruction_get_sources(instr, &sources);
for (i = 0; i < count; i++)
{
- if (types[i] != ILT_CALL) continue;
+ if (sources[i].type != ILT_CALL) continue;
- g_arch_instruction_set_flag(sources[i], AIF_RETURN_POINT);
+ g_arch_instruction_set_flag(sources[i].linked, AIF_RETURN_POINT);
}