From 3b2c60d63cf14ab1350125a4cba9dce1cefeb58e Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Wed, 6 Jun 2018 18:35:17 +0200 Subject: Deleted old unused code. --- src/analysis/binary.c | 88 --------------------------------------------------- src/analysis/binary.h | 3 -- 2 files changed, 91 deletions(-) diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 498f5c4..222bafc 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -363,94 +363,6 @@ GLoadedContent *g_loaded_binary_new(GExeFormat *format) } - -/****************************************************************************** -* * -* Paramètres : content = contenu binaire chargé en mémoire. * -* * -* Description : Interprète un contenu binaire chargé. * -* * -* Retour : Adresse de la représentation ou NULL en cas d'échec. * -* * -* Remarques : - * -* * -******************************************************************************/ - -GLoadedBinary *g_loaded_binary_new_old(GBinContent *content) -{ - GLoadedBinary *result; /* Adresse à retourner */ - FormatMatchStatus status; /* Statut d'une reconnaissance */ - char *target; /* Sous-traitance requise */ - const char *desc; /* Description humaine associée*/ - const char *arch; /* Architecture d'exécution */ - - result = g_object_new(G_TYPE_LOADED_BINARY, NULL); - - log_variadic_message(LMT_PROCESS, _("Opening binary data from '%s'..."), - g_binary_content_describe(content, true)); - - /* Format d'exécutable */ - - status = find_matching_format(content, NULL, &target); - assert(status == FMS_MATCHED); - - desc = get_binary_format_name(target); - - if (desc == NULL) - { - free(target); - log_simple_message(LMT_INFO, _("Unknown binary format")); - goto lbf_error; - } - else - log_variadic_message(LMT_INFO, _("Detected format: %s"), desc); - - result->format = G_EXE_FORMAT(load_new_named_format(target, content, NULL)); - - free(target); - - if (result->format == NULL) - { - log_simple_message(LMT_ERROR, _("Error while loading the binary")); - goto lbf_error; - } - - /* Informations de débogage associées */ - - g_loaded_binary_attach_debug_info(result, content); - - /* Architecture visée */ - - arch = g_exe_format_get_target_machine(result->format); - desc = get_arch_processor_name(arch); - - if (desc == NULL) - { - log_simple_message(LMT_INFO, _("Unknown architecture")); - goto lbf_error; - } - else - log_variadic_message(LMT_INFO, _("Detected architecture: %s"), desc); - - result->proc = get_arch_processor_for_type(arch); - - if (result->proc == NULL) - { - log_simple_message(LMT_ERROR, _("Unable to load the required processor")); - goto lbf_error; - } - - return G_LOADED_BINARY(result); - - lbf_error: - - g_object_unref(G_OBJECT(result)); - - return NULL; - -} - - /****************************************************************************** * * * Paramètres : binary = élément binaire à consulter. * diff --git a/src/analysis/binary.h b/src/analysis/binary.h index fd25210..906469a 100644 --- a/src/analysis/binary.h +++ b/src/analysis/binary.h @@ -76,9 +76,6 @@ GType g_loaded_binary_get_type(void); /* Interprète un contenu binaire chargé. */ GLoadedContent *g_loaded_binary_new(GExeFormat *); -/* Interprète un contenu binaire chargé. */ -GLoadedBinary *g_loaded_binary_new_old(GBinContent *); - /* Fournit le nom associé à l'élément binaire. */ const char *g_loaded_binary_get_name(const GLoadedBinary *, bool); -- cgit v0.11.2-87-g4458