summaryrefslogtreecommitdiff
path: root/src/analysis/decomp
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-12-08 16:46:49 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-12-08 16:46:49 (GMT)
commit4dd8356e19b9e58990b2f3e0c4110aa2fe9642d1 (patch)
tree26ede3d87b05f0baeb915066cb01eee60a83f2e3 /src/analysis/decomp
parent2a7e284702a9cf3cfd060fe50e7ef96621633aa4 (diff)
Cut instructions flow into blocks (to be continued).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@297 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/decomp')
-rw-r--r--src/analysis/decomp/decompiler.c2
-rw-r--r--src/analysis/decomp/il.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/analysis/decomp/decompiler.c b/src/analysis/decomp/decompiler.c
index 91a9163..1ac177a 100644
--- a/src/analysis/decomp/decompiler.c
+++ b/src/analysis/decomp/decompiler.c
@@ -167,7 +167,7 @@ static void prepare_all_routines_for_decomp(const GLoadedBinary *binary, const c
max = g_binary_routine_get_address(routines[i])
+ g_binary_routine_get_size(routines[i]);
- printf("##### DECOMPILE '%s' #####\n", g_binary_routine_to_string(routines[i]));
+ //printf("##### DECOMPILE '%s' #####\n", g_binary_routine_to_string(routines[i]));
dinstrs = build_decompiled_block(instrs,
g_binary_routine_get_address(routines[i]),
diff --git a/src/analysis/decomp/il.c b/src/analysis/decomp/il.c
index d9b9588..693b8cb 100644
--- a/src/analysis/decomp/il.c
+++ b/src/analysis/decomp/il.c
@@ -253,7 +253,7 @@ GDecInstruction *build_decompiled_block(GArchInstruction *instrs, vmpa_t start,
result = NULL;
- printf("[+] processing 0x%08llx -> 0x%08llx... stop @ 0x%08llx\n", start, end, stop);
+ //printf("[+] processing 0x%08llx -> 0x%08llx... stop @ 0x%08llx\n", start, end, stop);
for (iter = g_arch_instruction_find_by_address(instrs, start, true);
iter != NULL;
@@ -266,7 +266,7 @@ GDecInstruction *build_decompiled_block(GArchInstruction *instrs, vmpa_t start,
pite = g_arch_instruction_decompile(iter, ctx);
g_arch_instruction_get_location(iter, NULL, NULL, &addr);
- printf(" --- decomp %p @ 0x%08llx\n", pite, addr);
+ //printf(" --- decomp %p @ 0x%08llx\n", pite, addr);
/* On n'approfondit que les chemins qui se séparent */
if (!g_arch_instruction_has_destinations(iter))
@@ -340,11 +340,11 @@ GDecInstruction *build_decompiled_block(GArchInstruction *instrs, vmpa_t start,
false_dinstr = build_decompiled_block(instrs, false_branch.jumps[0],
end, next_addr, context);
-
+ /*
printf("{branch : %p (0x%08llx) | %p (0x%08llx)\n",
true_dinstr, true_branch.jumps[0],
false_dinstr, false_branch.jumps[0]);
-
+ */
g_ite_instruction_set_branches(G_ITE_INSTRUCTION(pite), true_dinstr, false_dinstr);
if (next_addr == end) break;
@@ -364,7 +364,7 @@ GDecInstruction *build_decompiled_block(GArchInstruction *instrs, vmpa_t start,
first = g_dec_context_get_decomp_instrs(ctx);
- printf(" ... context instr : %p\n", first);
+ //printf(" ... context instr : %p\n", first);
for (dinstr = first;
dinstr != NULL;
@@ -375,7 +375,7 @@ GDecInstruction *build_decompiled_block(GArchInstruction *instrs, vmpa_t start,
}
- printf(" ... return %p\n", result);
+ //printf(" ... return %p\n", result);
return result;