summaryrefslogtreecommitdiff
path: root/src/analysis/decomp/decompiler.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-01-14 22:08:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-01-14 22:08:00 (GMT)
commit2ab78407e9f73b6508afc281400a7c3fc018217f (patch)
tree437054ef874e9536e15b9254a6a8c4c2396604ff /src/analysis/decomp/decompiler.c
parent35a6cd881528b5f77ce09476eccb39d02d9cc634 (diff)
Cleaned the context used for decompilations.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@324 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/decomp/decompiler.c')
-rw-r--r--src/analysis/decomp/decompiler.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/analysis/decomp/decompiler.c b/src/analysis/decomp/decompiler.c
index fff654f..71a9286 100644
--- a/src/analysis/decomp/decompiler.c
+++ b/src/analysis/decomp/decompiler.c
@@ -139,12 +139,12 @@ static void prepare_all_routines_for_decomp(const GLoadedBinary *binary, const c
size_t i;
- GDecContext *context; /* Contexte pour la décompil. */
+ //GDecContext *context; /* Contexte pour la décompil. */
GDecInstruction *dinstrs;
- GArchInstruction *instrs; /* Instructions natives */
+ //GArchInstruction *instrs; /* Instructions natives */
- vmpa_t max; /* Première adresse à écarter */
+ //vmpa_t max; /* Première adresse à écarter */
format = g_loaded_binary_get_format(binary);
proc = get_arch_processor_from_format(G_EXE_FORMAT(format));
@@ -156,17 +156,19 @@ static void prepare_all_routines_for_decomp(const GLoadedBinary *binary, const c
for (i = 0; i < count; i++)
{
+ /*
context = g_arch_processor_get_decomp_context(proc);
g_object_set_data(G_OBJECT(context), "format", format);
g_object_set_data(G_OBJECT(context), "routine", routines[i]);
g_dec_context_set_max_address(context, max);
-
+ */
+ /*
instrs = g_binary_routine_get_instructions(routines[i]);
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]));
@@ -185,10 +187,10 @@ static void prepare_all_routines_for_decomp(const GLoadedBinary *binary, const c
g_binary_routine_set_decomp_instructions(routines[i], dinstrs);
-
+ /*
if (context != NULL)
g_object_unref(context);
-
+ */
}