diff options
Diffstat (limited to 'src/arch/dalvik/opcodes/goto.c')
-rw-r--r-- | src/arch/dalvik/opcodes/goto.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/arch/dalvik/opcodes/goto.c b/src/arch/dalvik/opcodes/goto.c index 36bf4ba..c94a3a9 100644 --- a/src/arch/dalvik/opcodes/goto.c +++ b/src/arch/dalvik/opcodes/goto.c @@ -2,7 +2,7 @@ /* OpenIDA - Outil d'analyse de fichiers binaires * goto.c - décodage des branchements inconditionnels * - * Copyright (C) 2010-2011 Cyrille Bagard + * Copyright (C) 2010-2012 Cyrille Bagard * * This file is part of OpenIDA. * @@ -36,6 +36,7 @@ * len = taille totale des données à analyser. * * addr = adresse virtuelle de l'instruction. * * proc = architecture ciblée par le désassemblage. * +* fmt = format du fichier contenant le code. * * * * Description : Décode une instruction de type 'goto'. * * * @@ -45,7 +46,7 @@ * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_goto(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_goto(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt) { GArchInstruction *result; /* Instruction à retourner */ SourceEndian endian; /* Boutisme lié au binaire */ @@ -54,7 +55,7 @@ GArchInstruction *dalvik_read_instr_goto(const bin_t *data, off_t *pos, off_t le endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_10T, addr)) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_10T, addr)) { g_object_unref(G_OBJECT(result)); return NULL; @@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_goto(const bin_t *data, off_t *pos, off_t le * len = taille totale des données à analyser. * * addr = adresse virtuelle de l'instruction. * * proc = architecture ciblée par le désassemblage. * +* fmt = format du fichier contenant le code. * * * * Description : Décode une instruction de type 'goto/16'. * * * @@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_goto(const bin_t *data, off_t *pos, off_t le * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_goto_16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_goto_16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt) { GArchInstruction *result; /* Instruction à retourner */ SourceEndian endian; /* Boutisme lié au binaire */ @@ -90,7 +92,7 @@ GArchInstruction *dalvik_read_instr_goto_16(const bin_t *data, off_t *pos, off_t endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_20T, addr)) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_20T, addr)) { g_object_unref(G_OBJECT(result)); return NULL; @@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_goto_16(const bin_t *data, off_t *pos, off_t * len = taille totale des données à analyser. * * addr = adresse virtuelle de l'instruction. * * proc = architecture ciblée par le désassemblage. * +* fmt = format du fichier contenant le code. * * * * Description : Décode une instruction de type 'goto/32'. * * * @@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_goto_16(const bin_t *data, off_t *pos, off_t * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_goto_32(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_goto_32(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc, const GDexFormat *fmt) { GArchInstruction *result; /* Instruction à retourner */ SourceEndian endian; /* Boutisme lié au binaire */ @@ -126,7 +129,7 @@ GArchInstruction *dalvik_read_instr_goto_32(const bin_t *data, off_t *pos, off_t endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_30T, addr)) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_30T, addr)) { g_object_unref(G_OBJECT(result)); return NULL; |