diff options
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r-- | src/analysis/binary.c | 88 |
1 files changed, 0 insertions, 88 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. * |