diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-01-09 20:36:26 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-01-09 20:36:26 (GMT) |
commit | 7cc35e17f3af39ad9a23bff93c42d86f73dd1001 (patch) | |
tree | 13bf4ab0af8c277b5503720bb45f6a753206d241 /src/analysis/decomp/decompiler.c | |
parent | dcd03173f71b09f38238f50dfcf4c1db0c014c4c (diff) |
Restored some parts of the decompilation process using the new basic blocks.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@320 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/decomp/decompiler.c')
-rw-r--r-- | src/analysis/decomp/decompiler.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/analysis/decomp/decompiler.c b/src/analysis/decomp/decompiler.c index c824697..47c379d 100644 --- a/src/analysis/decomp/decompiler.c +++ b/src/analysis/decomp/decompiler.c @@ -167,11 +167,16 @@ 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 = decompiled_routine_instructions(routines[i], format, proc); + + /* dinstrs = build_decompiled_block(instrs, g_binary_routine_get_address(routines[i]), max, VMPA_MAX, context); + */ //instr = g_binary_format_decompile_routine(G_BIN_FORMAT(format), routines[i], context); @@ -216,8 +221,6 @@ GCodeBuffer *decompile_all_from_file(const GLoadedBinary *binary, const char *fi build_decomp_prologue(result, filename); - - /* prepare_all_routines_for_decomp(binary, filename); @@ -225,7 +228,7 @@ GCodeBuffer *decompile_all_from_file(const GLoadedBinary *binary, const char *fi format = g_loaded_binary_get_format(binary); g_binary_format_decompile(G_BIN_FORMAT(format), result, filename); - */ + return result; |