diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-02-09 20:15:52 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-02-09 20:15:52 (GMT) |
commit | 8d326041a0379b87e54be44506d544367567e89b (patch) | |
tree | a3c3555c27c30858155fbee4df0ca236f33774f8 /src/analysis/disass/fetch.c | |
parent | b70f428256963385a140e9eb503624106df5aa9b (diff) |
Registered all the supported processors in the system code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@467 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/disass/fetch.c')
-rw-r--r-- | src/analysis/disass/fetch.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/analysis/disass/fetch.c b/src/analysis/disass/fetch.c index b912ff2..16b81c8 100644 --- a/src/analysis/disass/fetch.c +++ b/src/analysis/disass/fetch.c @@ -143,7 +143,7 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt { GArchInstruction *result; /* Instruction désassemblées */ GBinFormat *format; /* Format du fichier binaire */ - //GArchProcessor *proc; /* Architecture du binaire */ + GArchProcessor *proc; /* Architecture du binaire */ GProcContext *ctx; /* Contexte de désassemblage */ off_t length; /* Taille des données à lire */ mem_area *areas; /* Zone de productions */ @@ -158,15 +158,10 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt double done; /* Portion de travail accompli */ format = G_BIN_FORMAT(g_loaded_binary_get_format(binary)); - - /* - proc = get_arch_processor_from_format(G_EXE_FORMAT(format)); + proc = g_loaded_binary_get_processor(binary); ctx = g_arch_processor_get_context(proc); - */ - - ctx = g_binary_format_get_disassembling_context(format); - + g_binary_format_setup_disassembling_context(format, ctx); /* Définition à la découpe des parties à traiter */ @@ -234,6 +229,8 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt /* free */ + g_object_unref(G_OBJECT(proc)); + return result; } |