diff options
Diffstat (limited to 'src/analysis/disass')
-rw-r--r-- | src/analysis/disass/fetch.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/analysis/disass/fetch.c b/src/analysis/disass/fetch.c index 760363e..e487dd2 100644 --- a/src/analysis/disass/fetch.c +++ b/src/analysis/disass/fetch.c @@ -2,7 +2,7 @@ /* OpenIDA - Outil d'analyse de fichiers binaires * fetch.c - récupération d'instructions à partir de binaire brut * - * Copyright (C) 2010-2011 Cyrille Bagard + * Copyright (C) 2010-2012 Cyrille Bagard * * This file is part of OpenIDA. * @@ -48,6 +48,7 @@ GArchInstruction *disassemble_binary_parts(const GOpenidaBinary *binary, GBinPart **parts, size_t count, GtkExtStatusBar *statusbar, guint id) { GArchInstruction *result; /* Liste d'instr. à renvoyer */ + GBinFormat *format; /* Format du fichier binaire */ GArchProcessor *proc; /* Architecture du binaire */ off_t bin_length; /* Taille des données à lire */ bin_t *bin_data; /* Données binaires à lire */ @@ -68,7 +69,8 @@ GArchInstruction *disassemble_binary_parts(const GOpenidaBinary *binary, GBinPar result = NULL; - proc = get_arch_processor_from_format(g_openida_binary_get_format(binary)); + format = g_openida_binary_get_format(binary); + proc = get_arch_processor_from_format(format); bin_data = g_openida_binary_get_data(binary, &bin_length); /* Préparation du suivi de la progression */ @@ -107,7 +109,7 @@ GArchInstruction *disassemble_binary_parts(const GOpenidaBinary *binary, GBinPar addr = base + pos; instr = g_arch_processor_decode_instruction(proc, context, &bin_data[start], - &pos, len, start, addr); + &pos, len, start, addr, format); g_arch_instruction_add_to_list(&result, instr); #ifdef DEBUG |