diff options
Diffstat (limited to 'src/arch/dalvik/opcodes/sget.c')
-rw-r--r-- | src/arch/dalvik/opcodes/sget.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/arch/dalvik/opcodes/sget.c b/src/arch/dalvik/opcodes/sget.c index 6a51103..1f5eff7 100644 --- a/src/arch/dalvik/opcodes/sget.c +++ b/src/arch/dalvik/opcodes/sget.c @@ -2,7 +2,7 @@ /* OpenIDA - Outil d'analyse de fichiers binaires * sget.c - décodage des instructions manipulant des champs statiques (chargement) * - * 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 'sget'. * * * @@ -45,7 +46,7 @@ * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_sget(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_sget(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_sget(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_21C | DALVIK_OP_POOL(DPT_FIELD))) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) { g_object_unref(G_OBJECT(result)); return NULL; @@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_sget(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 'sget-boolean'. * * * @@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_sget(const bin_t *data, off_t *pos, off_t le * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_sget_boolean(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_sget_boolean(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_sget_boolean(const bin_t *data, off_t *pos, endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) { g_object_unref(G_OBJECT(result)); return NULL; @@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_sget_boolean(const bin_t *data, off_t *pos, * 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 'sget-byte'. * * * @@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_sget_boolean(const bin_t *data, off_t *pos, * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_sget_byte(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_sget_byte(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_sget_byte(const bin_t *data, off_t *pos, off endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) { g_object_unref(G_OBJECT(result)); return NULL; @@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_sget_byte(const bin_t *data, off_t *pos, off * 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 'sget-char'. * * * @@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_sget_byte(const bin_t *data, off_t *pos, off * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_sget_char(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_sget_char(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 */ @@ -162,7 +166,7 @@ GArchInstruction *dalvik_read_instr_sget_char(const bin_t *data, off_t *pos, off endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) { g_object_unref(G_OBJECT(result)); return NULL; @@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_sget_char(const bin_t *data, off_t *pos, off * 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 'sget-object'. * * * @@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_sget_char(const bin_t *data, off_t *pos, off * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_sget_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_sget_object(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 */ @@ -198,7 +203,7 @@ GArchInstruction *dalvik_read_instr_sget_object(const bin_t *data, off_t *pos, o endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) { g_object_unref(G_OBJECT(result)); return NULL; @@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_sget_object(const bin_t *data, off_t *pos, o * 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 'sget-short'. * * * @@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_sget_object(const bin_t *data, off_t *pos, o * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_sget_short(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_sget_short(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 */ @@ -234,7 +240,7 @@ GArchInstruction *dalvik_read_instr_sget_short(const bin_t *data, off_t *pos, of endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) { g_object_unref(G_OBJECT(result)); return NULL; @@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_sget_short(const bin_t *data, off_t *pos, of * 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 'sget-wide'. * * * @@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_sget_short(const bin_t *data, off_t *pos, of * * ******************************************************************************/ -GArchInstruction *dalvik_read_instr_sget_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc) +GArchInstruction *dalvik_read_instr_sget_wide(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 */ @@ -270,7 +277,7 @@ GArchInstruction *dalvik_read_instr_sget_wide(const bin_t *data, off_t *pos, off endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc)); - if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) + if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_FIELD))) { g_object_unref(G_OBJECT(result)); return NULL; |