diff options
Diffstat (limited to 'src/analysis/disass')
-rw-r--r-- | src/analysis/disass/macro.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/analysis/disass/macro.c b/src/analysis/disass/macro.c index 0fef9a0..14dad95 100644 --- a/src/analysis/disass/macro.c +++ b/src/analysis/disass/macro.c @@ -150,7 +150,7 @@ static void find_next_jumps(GArchInstruction *instrs, vmpa_t start, vmpa_t end, if (!g_arch_instruction_has_destinations(iter)) continue; - dcount = g_arch_instruction_get_destinations(iter, &dests, &types); + dcount = g_arch_instruction_get_destinations(iter, &dests, &types, NULL); for (i = 0; i < dcount; i++) switch (types[i]) @@ -360,7 +360,7 @@ static GInstrBlock *build_instruction_block(GArchInstruction *instrs, vmpa_t sta /* Adaptations en fonction du type de bifurcation */ - dcount = g_arch_instruction_get_destinations(iter, &dests, &types); + dcount = g_arch_instruction_get_destinations(iter, &dests, &types, NULL); next_addr = 0; cases_branches = NULL; @@ -439,20 +439,22 @@ static GInstrBlock *build_instruction_block(GArchInstruction *instrs, vmpa_t sta DELAYED_BLOCK_ADDING(result, result_cached, block); - //printf(" --- cases --- start\n"); + printf(" --- cases --- start\n"); next_addr = compute_first_common_addr_in_group(cases_branches, cases_count); - //printf(" stop :: 0x%08llx\n", next_addr); + printf(" stop :: 0x%08llx\n", next_addr); parent = block; group = g_virtual_block_new(); for (j = 0; j < cases_count; j++) { - //printf(" ## %zu\n", j); + printf(" ## %zu...", j); block = build_instruction_block(instrs, cases_branches[j].jumps[0], end, next_addr); + printf(" %p\n", block); + if (block != NULL) g_virtual_block_add_child(G_VIRTUAL_BLOCK(group), block); @@ -469,7 +471,7 @@ static GInstrBlock *build_instruction_block(GArchInstruction *instrs, vmpa_t sta else g_object_unref(G_OBJECT(group)); - //printf(" --- cases --- end\n"); + printf(" --- cases --- end\n"); free(cases_branches); |