diff options
Diffstat (limited to 'src/format')
| -rw-r--r-- | src/format/format.c | 60 | ||||
| -rw-r--r-- | src/format/format.h | 7 | 
2 files changed, 2 insertions, 65 deletions
| diff --git a/src/format/format.c b/src/format/format.c index 79ef5dd..b7ec199 100644 --- a/src/format/format.c +++ b/src/format/format.c @@ -2,7 +2,7 @@  /* OpenIDA - Outil d'analyse de fichiers binaires   * format.c - support des différents formats binaires   * - * Copyright (C) 2009-2012 Cyrille Bagard + * Copyright (C) 2009-2013 Cyrille Bagard   *   *  This file is part of OpenIDA.   * @@ -270,64 +270,6 @@ GBinRoutine **g_binary_format_get_routines(const GBinFormat *format, size_t *cou  /******************************************************************************  *                                                                             * -*  Paramètres  : format  = informations chargées à consulter.                 * -*                routine = routine à traiter.                                 * -*                ctx     = contexte de soutien à associer à l'opération.      * -*                                                                             * -*  Description : Procède à la décompilation basique d'une routine donnée.     * -*                                                                             * -*  Retour      : Instructions créées et enregistrées, ou NULL si erreur.      * -*                                                                             * -*  Remarques   : -                                                            * -*                                                                             * -******************************************************************************/ - -GDecInstruction *g_binary_format_decompile_routine(const GBinFormat *format, GBinRoutine *routine, GDecContext *ctx) -{ -    GDecInstruction *result;                /* Instructions décompilées    */ -    GArchInstruction *instr;                /* Instructions natives        */ -    vmpa_t max;                             /* Première adresse à écarter  */ -    GArchInstruction *iter;                 /* Boucle de parcours          */ -    GDecInstruction *first;                 /* Première décompilation      */ -    GDecInstruction *dinstr;                /* Nouvelle décompilation      */ - -    result = NULL; - -    instr = g_binary_routine_get_instructions(routine); -    max = g_binary_routine_get_address(routine) -        + g_binary_routine_get_size(routine); - -    g_object_set_data(G_OBJECT(ctx), "format", format); -    g_object_set_data(G_OBJECT(ctx), "routine", routine); -    g_dec_context_set_max_address(ctx, max); - -    for (iter = instr; -         iter != NULL; -         iter = g_arch_instruction_get_next_iter(instr, iter, max)) -    { -        g_arch_instruction_decompile(iter, ctx); -    } - -    first = g_dec_context_get_decomp_instrs(ctx); - -    for (dinstr = first; -         dinstr != NULL; -         dinstr = g_dec_instruction_get_next_iter(first, dinstr)) -    { -        if (result == NULL) result = g_expr_block_new(dinstr); -        else g_expr_block_add_item(G_EXPR_BLOCK(result), dinstr); - -    } - -    g_binary_routine_set_decomp_instructions(routine, result); - -    return result; - -} - - -/****************************************************************************** -*                                                                             *  *  Paramètres  : format = informations chargées à consulter.                  *  *                count  = taille de la liste retournée. [OUT]                 *  *                defsrc = fichier de code principal. [OUT]                    * diff --git a/src/format/format.h b/src/format/format.h index fec03ea..f0489e9 100644 --- a/src/format/format.h +++ b/src/format/format.h @@ -2,7 +2,7 @@  /* OpenIDA - Outil d'analyse de fichiers binaires   * format.h - prototypes pour le support des différents formats binaires   * - * Copyright (C) 2009-2011 Cyrille Bagard + * Copyright (C) 2009-2013 Cyrille Bagard   *   *  This file is part of OpenIDA.   * @@ -32,8 +32,6 @@  #include "symbol.h"  #include "../analysis/routine.h" -#include "../decomp/context.h" -#include "../decomp/instruction.h" @@ -72,9 +70,6 @@ void g_binary_format_add_routine(GBinFormat *, GBinRoutine *);  /* Fournit le prototype de toutes les routines détectées. */  GBinRoutine **g_binary_format_get_routines(const GBinFormat *, size_t *); -/* Procède à la décompilation basique d'une routine donnée. */ -GDecInstruction *g_binary_format_decompile_routine(const GBinFormat *, GBinRoutine *, GDecContext *); -  /* Fournit la liste des fichiers source détectés. */  const char * const *g_binary_format_get_source_files(const GBinFormat *, size_t *, size_t *); | 
