diff options
Diffstat (limited to 'src/analysis/disass')
-rw-r--r-- | src/analysis/disass/disassembler.c | 5 | ||||
-rw-r--r-- | src/analysis/disass/disassembler.h | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c index c270389..5a866c0 100644 --- a/src/analysis/disass/disassembler.c +++ b/src/analysis/disass/disassembler.c @@ -368,6 +368,7 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con * Paramètres : binary = représentation de binaire chargé. * * parts = parties binaires à désassembler. * * count = nombre de parties à traiter. * +* instrs = liste des instructions chargées. [OUT] * * * * Description : Procède au désassemblage d'un contenu binaire donné. * * * @@ -377,7 +378,7 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con * * ******************************************************************************/ -GCodeBuffer *disassemble_binary(const GOpenidaBinary *binary, GBinPart **parts, size_t parts_count) +GCodeBuffer *disassemble_binary(const GOpenidaBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs) { GCodeBuffer *result; /* Tampon constitué à renvoyer */ const uint8_t *data; /* Données binaires brutes */ @@ -397,6 +398,8 @@ GCodeBuffer *disassemble_binary(const GOpenidaBinary *binary, GBinPart **parts, g_delayed_work_wait_for_completion(G_DELAYED_WORK(disass)); + *instrs = disass->instrs; + g_object_unref(G_OBJECT(disass)); return result; diff --git a/src/analysis/disass/disassembler.h b/src/analysis/disass/disassembler.h index 7cfdcc5..2a0f72a 100644 --- a/src/analysis/disass/disassembler.h +++ b/src/analysis/disass/disassembler.h @@ -2,7 +2,7 @@ /* OpenIDA - Outil d'analyse de fichiers binaires * disassembler.h - prototypes pour l'encadrement des phases de désassemblage * - * Copyright (C) 2010 Cyrille Bagard + * Copyright (C) 2010-2012 Cyrille Bagard * * This file is part of OpenIDA. * @@ -31,7 +31,7 @@ /* Procède à la décompilation des routines d'un fichier donné. */ -GCodeBuffer *disassemble_binary(const GOpenidaBinary *, GBinPart **parts, size_t parts_count); +GCodeBuffer *disassemble_binary(const GOpenidaBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **); |