diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-12 01:57:23 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-12 01:57:23 (GMT) |
commit | ba1d7ae3ae3c82ab2c3d23a900c16baff6f8ca26 (patch) | |
tree | 04a1d3fb7a7e8c9d2dffd91576bcd0d051ae3750 /src/analysis | |
parent | 2be3bca7ff0f8ab40615fdbf72c149cd6439b0ac (diff) |
Defined AIF_RETURN_POINT to replace the previous 'return' accessors.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@546 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/disass/area.c | 4 | ||||
-rw-r--r-- | src/analysis/disass/links.c | 2 | ||||
-rw-r--r-- | src/analysis/disass/loop.c | 2 | ||||
-rw-r--r-- | src/analysis/disass/macro.c | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c index a0ad90e..94d659b 100644 --- a/src/analysis/disass/area.c +++ b/src/analysis/disass/area.c @@ -617,13 +617,13 @@ bool load_code_from_mem_area(mem_area **list, size_t *count, size_t *index, cons assert(!is_range_blank_in_mem_areas(*list, *count, &range)); - if (g_arch_instruction_is_return(instr)) + if (g_arch_instruction_get_flags(instr) & AIF_RETURN_POINT) printf("BREAK @ 0x%08x\n", (unsigned int)get_virt_addr(&prev)); //continue; /* Rupture du flot d'exécution ? */ - if (g_arch_instruction_is_return(instr)) + if (g_arch_instruction_get_flags(instr) & AIF_RETURN_POINT) break; } diff --git a/src/analysis/disass/links.c b/src/analysis/disass/links.c index 545afb1..43b7e6f 100644 --- a/src/analysis/disass/links.c +++ b/src/analysis/disass/links.c @@ -156,7 +156,7 @@ static void establish_natural_link(GArchInstruction *instr, GArchInstruction *pr * avec le voisin. */ - if (g_arch_instruction_is_return(prev)) + if (g_arch_instruction_get_flags(prev) & AIF_RETURN_POINT) return; if (g_arch_instruction_get_flags(instr) & AIF_ROUTINE_START) diff --git a/src/analysis/disass/loop.c b/src/analysis/disass/loop.c index 9a99bc4..88b997f 100644 --- a/src/analysis/disass/loop.c +++ b/src/analysis/disass/loop.c @@ -224,7 +224,7 @@ static void track_loops_in_code(const GArchProcessor *proc, const mrange_t *rang /* Fin de parcours ? */ - if (g_arch_instruction_is_return(iter)) + if (g_arch_instruction_get_flags(iter) & AIF_RETURN_POINT) break; /** diff --git a/src/analysis/disass/macro.c b/src/analysis/disass/macro.c index 4e77881..a9ae261 100644 --- a/src/analysis/disass/macro.c +++ b/src/analysis/disass/macro.c @@ -638,10 +638,10 @@ static void find_next_hops(GArchProcessor *proc, const vmpa2t *start, const code - if (g_arch_instruction_is_return(iter)) + if (g_arch_instruction_get_flags(iter) & AIF_RETURN_POINT) printf(" ++ return 0x%08x\n", (unsigned int)range->addr.virtual); - if (g_arch_instruction_is_return(iter)) + if (g_arch_instruction_get_flags(iter) & AIF_RETURN_POINT) { iter = NULL; break; @@ -1231,7 +1231,7 @@ static GInstrBlock *build_instruction_blocks(GArchProcessor *proc, code_coverage * L'expérience montre qu'il peut y avoir plusieurs fins dans une routine, * et donc des fins en milieu de couverture de cette même routine. */ - if (g_arch_instruction_is_return(iter)) break; + if (g_arch_instruction_get_flags(iter) & AIF_RETURN_POINT) break; /* On n'approfondit que les chemins qui se séparent */ if (!g_arch_instruction_has_destinations(iter)) |