summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-03-05 00:17:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-03-05 00:17:30 (GMT)
commit13bd8d546b2de76b1f5a1d758c9e476f7d859f39 (patch)
tree3d1c7dc3343ad4d460a9245bd2bb138fada611b3
parentaba1a14ba28f6df51b3be15648b6f55eea4a0e19 (diff)
Printed the string values of the Dex pool in the operand rendering.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@237 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r--ChangeLog53
-rw-r--r--plugins/theseus/theseus.c4
-rw-r--r--src/analysis/disass/fetch.c8
-rw-r--r--src/arch/dalvik/opcodes/add.c27
-rw-r--r--src/arch/dalvik/opcodes/aget.c37
-rw-r--r--src/arch/dalvik/opcodes/and.c22
-rw-r--r--src/arch/dalvik/opcodes/aput.c37
-rw-r--r--src/arch/dalvik/opcodes/array.c12
-rw-r--r--src/arch/dalvik/opcodes/check.c7
-rw-r--r--src/arch/dalvik/opcodes/cmp.c27
-rw-r--r--src/arch/dalvik/opcodes/const.c57
-rw-r--r--src/arch/dalvik/opcodes/div.c27
-rw-r--r--src/arch/dalvik/opcodes/goto.c17
-rw-r--r--src/arch/dalvik/opcodes/if.c62
-rw-r--r--src/arch/dalvik/opcodes/iget.c37
-rw-r--r--src/arch/dalvik/opcodes/invoke.c52
-rw-r--r--src/arch/dalvik/opcodes/iput.c37
-rw-r--r--src/arch/dalvik/opcodes/move.c47
-rw-r--r--src/arch/dalvik/opcodes/mul.c32
-rw-r--r--src/arch/dalvik/opcodes/new.c12
-rw-r--r--src/arch/dalvik/opcodes/nop.c7
-rw-r--r--src/arch/dalvik/opcodes/opcodes.h343
-rw-r--r--src/arch/dalvik/opcodes/or.c22
-rw-r--r--src/arch/dalvik/opcodes/rem.c22
-rw-r--r--src/arch/dalvik/opcodes/ret.c22
-rw-r--r--src/arch/dalvik/opcodes/rsub.c12
-rw-r--r--src/arch/dalvik/opcodes/sget.c37
-rw-r--r--src/arch/dalvik/opcodes/shl.c27
-rw-r--r--src/arch/dalvik/opcodes/shr.c27
-rw-r--r--src/arch/dalvik/opcodes/sput.c37
-rw-r--r--src/arch/dalvik/opcodes/sub.c7
-rw-r--r--src/arch/dalvik/opcodes/switch.c12
-rw-r--r--src/arch/dalvik/opcodes/to.c77
-rw-r--r--src/arch/dalvik/opcodes/ushr.c27
-rw-r--r--src/arch/dalvik/opcodes/xor.c22
-rw-r--r--src/arch/dalvik/operand.c34
-rw-r--r--src/arch/dalvik/operand.h5
-rw-r--r--src/arch/dalvik/operands/pool.c23
-rw-r--r--src/arch/dalvik/operands/pool.h5
-rw-r--r--src/arch/dalvik/processor.c21
-rw-r--r--src/arch/processor-int.h4
-rw-r--r--src/arch/processor.c7
-rw-r--r--src/arch/processor.h5
-rw-r--r--src/format/elf/helper_x86.c4
44 files changed, 836 insertions, 587 deletions
diff --git a/ChangeLog b/ChangeLog
index baea73c..3aa1893 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+12-03-05 Cyrille Bagard <nocbos@gmail.com>
+
+ * plugins/theseus/theseus.c:
+ * src/analysis/disass/fetch.c:
+ * src/arch/dalvik/opcodes/add.c:
+ * src/arch/dalvik/opcodes/aget.c:
+ * src/arch/dalvik/opcodes/and.c:
+ * src/arch/dalvik/opcodes/aput.c:
+ * src/arch/dalvik/opcodes/array.c:
+ * src/arch/dalvik/opcodes/check.c:
+ * src/arch/dalvik/opcodes/cmp.c:
+ * src/arch/dalvik/opcodes/const.c:
+ * src/arch/dalvik/opcodes/div.c:
+ * src/arch/dalvik/opcodes/goto.c:
+ * src/arch/dalvik/opcodes/if.c:
+ * src/arch/dalvik/opcodes/iget.c:
+ * src/arch/dalvik/opcodes/invoke.c:
+ * src/arch/dalvik/opcodes/iput.c:
+ * src/arch/dalvik/opcodes/move.c:
+ * src/arch/dalvik/opcodes/mul.c:
+ * src/arch/dalvik/opcodes/new.c:
+ * src/arch/dalvik/opcodes/nop.c:
+ * src/arch/dalvik/opcodes/opcodes.h:
+ * src/arch/dalvik/opcodes/or.c:
+ * src/arch/dalvik/opcodes/rem.c:
+ * src/arch/dalvik/opcodes/ret.c:
+ * src/arch/dalvik/opcodes/rsub.c:
+ * src/arch/dalvik/opcodes/sget.c:
+ * src/arch/dalvik/opcodes/shl.c:
+ * src/arch/dalvik/opcodes/shr.c:
+ * src/arch/dalvik/opcodes/sput.c:
+ * src/arch/dalvik/opcodes/sub.c:
+ * src/arch/dalvik/opcodes/switch.c:
+ * src/arch/dalvik/opcodes/to.c:
+ * src/arch/dalvik/opcodes/ushr.c:
+ * src/arch/dalvik/opcodes/xor.c:
+ * src/arch/dalvik/operand.c:
+ * src/arch/dalvik/operand.h:
+ Update calls.
+
+ * src/arch/dalvik/operands/pool.c:
+ * src/arch/dalvik/operands/pool.h:
+ Print the string values of the Dex pool in the operand rendering.
+
+ * src/arch/dalvik/processor.c:
+ * src/arch/processor.c:
+ * src/arch/processor.h:
+ * src/arch/processor-int.h
+ Transmit the format related to the instructions.
+
+ * src/format/elf/helper_x86.c:
+ Update calls.
+
12-03-01 Cyrille Bagard <nocbos@gmail.com>
* pixmaps/chrysalide_text.png:
diff --git a/plugins/theseus/theseus.c b/plugins/theseus/theseus.c
index b04c355..5cc2d98 100644
--- a/plugins/theseus/theseus.c
+++ b/plugins/theseus/theseus.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* theseus.c - décompilation en fonction du flot d'exécution
*
- * Copyright (C) 2010-2011 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -506,7 +506,7 @@ static GRenderingLine *disassemble_target_address(GOpenidaBinary *binary, GRende
/* Décodage des instructions */
instr = g_arch_processor_decode_instruction(proc, NULL /*FIXME*/, data,
- &offset, length, 0/*offset*/, target);
+ &offset, length, 0/*offset*/, target, NULL/*FIXME*/);
line = g_code_line_new(target, instr, options);
g_rendering_line_add_to_lines(&result, line);
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
diff --git a/src/arch/dalvik/opcodes/add.c b/src/arch/dalvik/opcodes/add.c
index 771f222..b1431a9 100644
--- a/src/arch/dalvik/opcodes/add.c
+++ b/src/arch/dalvik/opcodes/add.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* add.c - décodage des opérations d'addition
*
- * 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 'add-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_add_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_add_int(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_add_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_add_int(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 'add-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_add_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_add_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_add_int_2addr(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_add_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_add_int_2addr(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 'add-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_add_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_add_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_add_int_lit8(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_add_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_add_int_lit8(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 'add-int/lit16'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_add_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_add_int_lit16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_add_int_lit16(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_add_int_lit16(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_add_int_lit16(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 'add-long/2addr'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_add_int_lit16(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_add_long_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_add_long_2addr(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_add_long_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/aget.c b/src/arch/dalvik/opcodes/aget.c
index e219972..bcf4984 100644
--- a/src/arch/dalvik/opcodes/aget.c
+++ b/src/arch/dalvik/opcodes/aget.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* aget.c - décodage des instructions manipulant des tableaux (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 'aget'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aget(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aget(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_aget(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_aget(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 'aget-boolean'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_aget(const bin_t *data, off_t *pos, off_t le
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aget_boolean(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aget_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_aget_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_aget_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 'aget-byte'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_aget_boolean(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aget_byte(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aget_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_aget_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_aget_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 'aget-char'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_aget_byte(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aget_char(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aget_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_aget_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_aget_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 'aget-object'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_aget_char(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aget_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aget_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_aget_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_aget_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 'aget-short'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_aget_object(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aget_short(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aget_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_aget_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_aget_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 'aget-wide'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_aget_short(const bin_t *data, off_t *pos, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aget_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aget_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_aget_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/and.c b/src/arch/dalvik/opcodes/and.c
index 5360df9..eb22536 100644
--- a/src/arch/dalvik/opcodes/and.c
+++ b/src/arch/dalvik/opcodes/and.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* and.c - décodage des opérations de ET logiques
*
- * 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 'and-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_and_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_and_int(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_and_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_and_int(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 'and-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_and_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_and_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_and_int_2addr(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_and_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_and_int_2addr(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 'and-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_and_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_and_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_and_int_lit8(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_and_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_and_int_lit8(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 'and-int/lit16'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_and_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_and_int_lit16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_and_int_lit16(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_and_int_lit16(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/aput.c b/src/arch/dalvik/opcodes/aput.c
index 4aab0c9..e55b8a4 100644
--- a/src/arch/dalvik/opcodes/aput.c
+++ b/src/arch/dalvik/opcodes/aput.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* aput.c - décodage des instructions manipulant des tableaux (enregistrement)
*
- * 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 'aput'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aput(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aput(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_aput(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_aput(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 'aput-boolean'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_aput(const bin_t *data, off_t *pos, off_t le
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aput_boolean(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aput_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_aput_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_aput_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 'aput-byte'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_aput_boolean(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aput_byte(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aput_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_aput_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_aput_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 'aput-char'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_aput_byte(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aput_char(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aput_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_aput_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_aput_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 'aput-object'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_aput_char(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aput_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aput_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_aput_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_aput_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 'aput-short'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_aput_object(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aput_short(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aput_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_aput_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_aput_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 'aput-wide'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_aput_short(const bin_t *data, off_t *pos, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_aput_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_aput_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_aput_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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/array.c b/src/arch/dalvik/opcodes/array.c
index ef27778..4abfabb 100644
--- a/src/arch/dalvik/opcodes/array.c
+++ b/src/arch/dalvik/opcodes/array.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* array.c - décodage de l'opération récupérant la longueur d'un tableau
*
- * 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 'array-length'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_array_length(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_array_length(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_array_length(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_array_length(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 'fill-array-data'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_array_length(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_fill_array_data(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_fill_array_data(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_fill_array_data(const bin_t *data, off_t *po
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_31T))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_31T))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/check.c b/src/arch/dalvik/opcodes/check.c
index 7157ee5..c3b2a9a 100644
--- a/src/arch/dalvik/opcodes/check.c
+++ b/src/arch/dalvik/opcodes/check.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* check.c - décodage des vérifications de types
*
- * 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 'check-cast'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_check_cast(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_check_cast(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_check_cast(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_TYPE)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_TYPE)))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/cmp.c b/src/arch/dalvik/opcodes/cmp.c
index ff899d4..eb3a601 100644
--- a/src/arch/dalvik/opcodes/cmp.c
+++ b/src/arch/dalvik/opcodes/cmp.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* cmp.c - décodage des instructions de comparaison
*
- * 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 'cmp-long'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_cmp_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_cmp_long(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_cmp_long(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_cmp_long(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 'cmpg-double'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_cmp_long(const bin_t *data, off_t *pos, off_
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_cmpg_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_cmpg_double(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_cmpg_double(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_cmpg_double(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 'cmpg-float'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_cmpg_double(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_cmpg_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_cmpg_float(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_cmpg_float(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_cmpg_float(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 'cmpl-double'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_cmpg_float(const bin_t *data, off_t *pos, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_cmpl_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_cmpl_double(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_cmpl_double(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_cmpl_double(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 'cmpl-float'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_cmpl_double(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_cmpl_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_cmpl_float(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_cmpl_float(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/const.c b/src/arch/dalvik/opcodes/const.c
index 9cc4341..7918e93 100644
--- a/src/arch/dalvik/opcodes/const.c
+++ b/src/arch/dalvik/opcodes/const.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* const.c - décodage des chargements de constantes
*
- * 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 'const'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const(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_const(const bin_t *data, off_t *pos, off_t l
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_31I))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_31I))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_const(const bin_t *data, off_t *pos, off_t l
* 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 'const/16'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_const(const bin_t *data, off_t *pos, off_t l
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_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_const_16(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_21S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21S))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_const_16(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 'const/4'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_const_16(const bin_t *data, off_t *pos, off_
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_4(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_4(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_const_4(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_11N))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11N))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_const_4(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 'const-class'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_const_4(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_class(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_class(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_const_class(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_TYPE)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_TYPE)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_const_class(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 'const/high16'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_const_class(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_high16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_high16(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_const_high16(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_21H))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21H))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_const_high16(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 'const-string'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_const_high16(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_string(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_string(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_const_string(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_STRING)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_STRING)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_const_string(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 'const-string/jumbo'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_const_string(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_string_jumbo(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_string_jumbo(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_const_string_jumbo(const bin_t *data, off_t
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_31C | DALVIK_OP_POOL(DPT_STRING)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_31C | DALVIK_OP_POOL(DPT_STRING)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -288,6 +295,7 @@ GArchInstruction *dalvik_read_instr_const_string_jumbo(const bin_t *data, 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 'const-wide'. *
* *
@@ -297,7 +305,7 @@ GArchInstruction *dalvik_read_instr_const_string_jumbo(const bin_t *data, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_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 */
@@ -306,7 +314,7 @@ GArchInstruction *dalvik_read_instr_const_wide(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_51L))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_51L))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -324,6 +332,7 @@ GArchInstruction *dalvik_read_instr_const_wide(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 'const-wide/16'. *
* *
@@ -333,7 +342,7 @@ GArchInstruction *dalvik_read_instr_const_wide(const bin_t *data, off_t *pos, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_wide_16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_wide_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 */
@@ -342,7 +351,7 @@ GArchInstruction *dalvik_read_instr_const_wide_16(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_21S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21S))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -360,6 +369,7 @@ GArchInstruction *dalvik_read_instr_const_wide_16(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 'const-wide/32'. *
* *
@@ -369,7 +379,7 @@ GArchInstruction *dalvik_read_instr_const_wide_16(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_wide_32(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_wide_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 */
@@ -378,7 +388,7 @@ GArchInstruction *dalvik_read_instr_const_wide_32(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_31I))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_31I))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -396,6 +406,7 @@ GArchInstruction *dalvik_read_instr_const_wide_32(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 'const-wide/high16'. *
* *
@@ -405,7 +416,7 @@ GArchInstruction *dalvik_read_instr_const_wide_32(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_const_wide_high16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_const_wide_high16(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 */
@@ -414,7 +425,7 @@ GArchInstruction *dalvik_read_instr_const_wide_high16(const bin_t *data, off_t *
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_21H))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21H))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/div.c b/src/arch/dalvik/opcodes/div.c
index e8b0705..9b67764 100644
--- a/src/arch/dalvik/opcodes/div.c
+++ b/src/arch/dalvik/opcodes/div.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* div.c - décodage des opérations de divisions
*
- * 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 'div-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_div_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_div_int(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_div_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_div_int(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 'div-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_div_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_div_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_div_int_2addr(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_div_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_div_int_2addr(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 'div-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_div_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_div_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_div_int_lit8(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_div_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_div_int_lit8(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 'div-int/lit16'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_div_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_div_int_lit16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_div_int_lit16(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_div_int_lit16(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_div_int_lit16(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 'div-long'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_div_int_lit16(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_div_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_div_long(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_div_long(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
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;
diff --git a/src/arch/dalvik/opcodes/if.c b/src/arch/dalvik/opcodes/if.c
index 9c29da3..f6e9d5e 100644
--- a/src/arch/dalvik/opcodes/if.c
+++ b/src/arch/dalvik/opcodes/if.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* if.c - décodage des branchements conditionnels
*
- * 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 'if-eq'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_eq(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_eq(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_if_eq(const bin_t *data, off_t *pos, off_t l
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_if_eq(const bin_t *data, off_t *pos, off_t l
* 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 'if-eqz'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_if_eq(const bin_t *data, off_t *pos, off_t l
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_eqz(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_eqz(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_if_eqz(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_21T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_if_eqz(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 'if-ge'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_if_eqz(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_ge(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_ge(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_if_ge(const bin_t *data, off_t *pos, off_t l
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_if_ge(const bin_t *data, off_t *pos, off_t l
* 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 'if-gez'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_if_ge(const bin_t *data, off_t *pos, off_t l
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_gez(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_gez(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_if_gez(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_21T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_if_gez(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 'if-gt'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_if_gez(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_gt(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_gt(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_if_gt(const bin_t *data, off_t *pos, off_t l
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_if_gt(const bin_t *data, off_t *pos, off_t l
* 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 'if-gtz'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_if_gt(const bin_t *data, off_t *pos, off_t l
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_gtz(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_gtz(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_if_gtz(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_21T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_if_gtz(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 'if-le'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_if_gtz(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_le(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_le(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_if_le(const bin_t *data, off_t *pos, off_t l
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -288,6 +295,7 @@ GArchInstruction *dalvik_read_instr_if_le(const bin_t *data, off_t *pos, off_t l
* 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 'if-lez'. *
* *
@@ -297,7 +305,7 @@ GArchInstruction *dalvik_read_instr_if_le(const bin_t *data, off_t *pos, off_t l
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_lez(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_lez(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 */
@@ -306,7 +314,7 @@ GArchInstruction *dalvik_read_instr_if_lez(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_21T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -324,6 +332,7 @@ GArchInstruction *dalvik_read_instr_if_lez(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 'if-lt'. *
* *
@@ -333,7 +342,7 @@ GArchInstruction *dalvik_read_instr_if_lez(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_lt(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_lt(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 */
@@ -342,7 +351,7 @@ GArchInstruction *dalvik_read_instr_if_lt(const bin_t *data, off_t *pos, off_t l
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -360,6 +369,7 @@ GArchInstruction *dalvik_read_instr_if_lt(const bin_t *data, off_t *pos, off_t l
* 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 'if-ltz'. *
* *
@@ -369,7 +379,7 @@ GArchInstruction *dalvik_read_instr_if_lt(const bin_t *data, off_t *pos, off_t l
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_ltz(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_ltz(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 */
@@ -378,7 +388,7 @@ GArchInstruction *dalvik_read_instr_if_ltz(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_21T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -396,6 +406,7 @@ GArchInstruction *dalvik_read_instr_if_ltz(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 'if-ne'. *
* *
@@ -405,7 +416,7 @@ GArchInstruction *dalvik_read_instr_if_ltz(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_ne(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_ne(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 */
@@ -414,7 +425,7 @@ GArchInstruction *dalvik_read_instr_if_ne(const bin_t *data, off_t *pos, off_t l
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -432,6 +443,7 @@ GArchInstruction *dalvik_read_instr_if_ne(const bin_t *data, off_t *pos, off_t l
* 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 'if-nez'. *
* *
@@ -441,7 +453,7 @@ GArchInstruction *dalvik_read_instr_if_ne(const bin_t *data, off_t *pos, off_t l
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_if_nez(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_if_nez(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 */
@@ -450,7 +462,7 @@ GArchInstruction *dalvik_read_instr_if_nez(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_21T, addr))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21T, addr))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/iget.c b/src/arch/dalvik/opcodes/iget.c
index 5dada0c..3490b94 100644
--- a/src/arch/dalvik/opcodes/iget.c
+++ b/src/arch/dalvik/opcodes/iget.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* iget.c - décodage des chargements de champs d'instance
*
- * 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 'iget'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iget(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iget(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_iget(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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_iget(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 'iget-boolean'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_iget(const bin_t *data, off_t *pos, off_t le
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iget_boolean(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iget_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_iget_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_iget_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 'iget-byte'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_iget_boolean(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iget_byte(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iget_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_iget_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_iget_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 'iget-char'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_iget_byte(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iget_char(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iget_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_iget_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_iget_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 'iget-object'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_iget_char(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iget_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iget_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_iget_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_iget_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 'iget-short'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_iget_object(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iget_short(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iget_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_iget_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_iget_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 'iget-wide'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_iget_short(const bin_t *data, off_t *pos, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iget_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iget_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_iget_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/invoke.c b/src/arch/dalvik/opcodes/invoke.c
index 444926f..df07bf9 100644
--- a/src/arch/dalvik/opcodes/invoke.c
+++ b/src/arch/dalvik/opcodes/invoke.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* invoke.c - décodage des appels de méthode
*
- * 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 'invoke-direct'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_direct(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_direct(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_invoke_direct(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_35C | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_invoke_direct(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 'invoke-direct/range'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_invoke_direct(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_direct_range(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_direct_range(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_invoke_direct_range(const bin_t *data, off_t
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_invoke_direct_range(const bin_t *data, 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 'invoke-interface'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_invoke_direct_range(const bin_t *data, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_interface(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_interface(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_invoke_interface(const bin_t *data, off_t *p
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_invoke_interface(const bin_t *data, off_t *p
* 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 'invoke-interface/range'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_invoke_interface(const bin_t *data, off_t *p
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_interface_range(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_interface_range(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_invoke_interface_range(const bin_t *data, of
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_invoke_interface_range(const bin_t *data, 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 'invoke-static'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_invoke_interface_range(const bin_t *data, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_static(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_static(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_invoke_static(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_35C | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_invoke_static(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 'invoke-static/range'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_invoke_static(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_static_range(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_static_range(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_invoke_static_range(const bin_t *data, off_t
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_invoke_static_range(const bin_t *data, 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 'invoke-super'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_invoke_static_range(const bin_t *data, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_super(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_super(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_invoke_super(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_35C | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -288,6 +295,7 @@ GArchInstruction *dalvik_read_instr_invoke_super(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 'invoke-super/range'. *
* *
@@ -297,7 +305,7 @@ GArchInstruction *dalvik_read_instr_invoke_super(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_super_range(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 */
@@ -306,7 +314,7 @@ GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *data, off_t
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -324,6 +332,7 @@ GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *data, 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 'invoke-virtual'. *
* *
@@ -333,7 +342,7 @@ GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *data, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_virtual(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_virtual(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 */
@@ -342,7 +351,7 @@ GArchInstruction *dalvik_read_instr_invoke_virtual(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_35C | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_35C | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -360,6 +369,7 @@ GArchInstruction *dalvik_read_instr_invoke_virtual(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 'invoke-virtual/range'. *
* *
@@ -369,7 +379,7 @@ GArchInstruction *dalvik_read_instr_invoke_virtual(const bin_t *data, off_t *pos
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_invoke_virtual_range(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_invoke_virtual_range(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 */
@@ -378,7 +388,7 @@ GArchInstruction *dalvik_read_instr_invoke_virtual_range(const bin_t *data, off_
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_3RC | DALVIK_OP_POOL(DPT_METHOD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/iput.c b/src/arch/dalvik/opcodes/iput.c
index 1afff4c..8e98884 100644
--- a/src/arch/dalvik/opcodes/iput.c
+++ b/src/arch/dalvik/opcodes/iput.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* iput.c - décodage des enregistrements de champs d'instance
*
- * 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 'iput'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iput(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iput(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_iput(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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_iput(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 'iput-boolean'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_iput(const bin_t *data, off_t *pos, off_t le
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iput_boolean(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iput_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_iput_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_iput_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 'iput-byte'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_iput_boolean(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iput_byte(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iput_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_iput_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_iput_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 'iput-char'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_iput_byte(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iput_char(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iput_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_iput_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_iput_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 'iput-object'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_iput_char(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iput_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iput_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_iput_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_iput_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 'iput-short'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_iput_object(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iput_short(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iput_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_iput_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_iput_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 'iput-wide'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_iput_short(const bin_t *data, off_t *pos, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_iput_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_iput_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_iput_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_22C | DALVIK_OP_POOL(DPT_FIELD)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_FIELD)))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/move.c b/src/arch/dalvik/opcodes/move.c
index 5cc6777..cb4e274 100644
--- a/src/arch/dalvik/opcodes/move.c
+++ b/src/arch/dalvik/opcodes/move.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* move.c - décodage des opérations de multiplications
*
- * 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 'move'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move(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_move(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_move(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 'move-exception'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_move(const bin_t *data, off_t *pos, off_t le
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_exception(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_exception(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_move_exception(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_11X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_move_exception(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 'move/from16'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_move_exception(const bin_t *data, off_t *pos
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_from_16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_from_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 */
@@ -126,7 +129,7 @@ GArchInstruction *dalvik_read_instr_move_from_16(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_22X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_move_from_16(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 'move-object'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_move_from_16(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_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 */
@@ -162,7 +166,7 @@ GArchInstruction *dalvik_read_instr_move_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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_move_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 'move-object/from16'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_move_object(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_object_from_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 */
@@ -198,7 +203,7 @@ GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *data, off_t
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *data, 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 'move-result'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *data, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_result(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_result(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_move_result(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_11X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_move_result(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 'move-result-object'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_move_result(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_result_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 */
@@ -270,7 +277,7 @@ GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *data, off_t
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_11X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -288,6 +295,7 @@ GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *data, 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 'move-result-wide'. *
* *
@@ -297,7 +305,7 @@ GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *data, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_result_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 */
@@ -306,7 +314,7 @@ GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *data, off_t *p
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_11X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -324,6 +332,7 @@ GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *data, off_t *p
* 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 'move-wide/from16'. *
* *
@@ -333,7 +342,7 @@ GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *data, off_t *p
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_move_wide_from_16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_move_wide_from_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 */
@@ -342,7 +351,7 @@ GArchInstruction *dalvik_read_instr_move_wide_from_16(const bin_t *data, off_t *
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_22X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/mul.c b/src/arch/dalvik/opcodes/mul.c
index 3b3a2db..334f568 100644
--- a/src/arch/dalvik/opcodes/mul.c
+++ b/src/arch/dalvik/opcodes/mul.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* mul.c - décodage des opérations de multiplications
*
- * 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 'mul-double/2addr'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_mul_double_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_mul_double_2addr(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_mul_double_2addr(const bin_t *data, off_t *p
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_mul_double_2addr(const bin_t *data, off_t *p
* 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 'mul-int'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_mul_double_2addr(const bin_t *data, off_t *p
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_mul_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_mul_int(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_mul_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_mul_int(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 'mul-int/2addr'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_mul_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_mul_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_mul_int_2addr(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_mul_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_mul_int_2addr(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 'mul-int/lit8'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_mul_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_mul_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_mul_int_lit8(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_mul_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_mul_int_lit8(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 'mul-int/lit16'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_mul_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_mul_int_lit16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_mul_int_lit16(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_mul_int_lit16(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_mul_int_lit16(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 'mul-long'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_mul_int_lit16(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_mul_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_mul_long(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_mul_long(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/new.c b/src/arch/dalvik/opcodes/new.c
index 602389b..4a16787 100644
--- a/src/arch/dalvik/opcodes/new.c
+++ b/src/arch/dalvik/opcodes/new.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* new.c - décodage des créations de nouvelles instances
*
- * 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 'new-array'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_new_array(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_new_array(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_new_array(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_22C | DALVIK_OP_POOL(DPT_TYPE)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22C | DALVIK_OP_POOL(DPT_TYPE)))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_new_array(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 'new-instance'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_new_array(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_new_instance(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_new_instance(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_new_instance(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_TYPE)))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_21C | DALVIK_OP_POOL(DPT_TYPE)))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/nop.c b/src/arch/dalvik/opcodes/nop.c
index 7ba79d5..349bd55 100644
--- a/src/arch/dalvik/opcodes/nop.c
+++ b/src/arch/dalvik/opcodes/nop.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* ret.c - décodage de l'instruction nulle
*
- * 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 'nop'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_nop(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_nop(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_nop(const bin_t *data, off_t *pos, off_t len
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_10X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_10X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/opcodes.h b/src/arch/dalvik/opcodes/opcodes.h
index ecc02ad..45457e3 100644
--- a/src/arch/dalvik/opcodes/opcodes.h
+++ b/src/arch/dalvik/opcodes/opcodes.h
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* opcodes.h - prototypes pour la liste de tous les opcodes de l'architecture Dalvik
*
- * Copyright (C) 2010-2011 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -27,574 +27,575 @@
#include "../instruction.h"
#include "../processor.h"
+#include "../../../format/dex/dex.h"
/* Prototype de décodage d'une instruction Dalvik. */
-typedef GArchInstruction * (* dalvik_read_instr) (const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+typedef GArchInstruction * (* dalvik_read_instr) (const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'add-int'. */
-GArchInstruction *dalvik_read_instr_add_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_add_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'add-int/2addr'. */
-GArchInstruction *dalvik_read_instr_add_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_add_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'add-int/lit8'. */
-GArchInstruction *dalvik_read_instr_add_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_add_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'add-int/lit16'. */
-GArchInstruction *dalvik_read_instr_add_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_add_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'add-long/2addr'. */
-GArchInstruction *dalvik_read_instr_add_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_add_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aget'. */
-GArchInstruction *dalvik_read_instr_aget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aget-boolean'. */
-GArchInstruction *dalvik_read_instr_aget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aget-byte'. */
-GArchInstruction *dalvik_read_instr_aget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aget-char'. */
-GArchInstruction *dalvik_read_instr_aget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aget-object'. */
-GArchInstruction *dalvik_read_instr_aget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aget-short'. */
-GArchInstruction *dalvik_read_instr_aget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aget-wide'. */
-GArchInstruction *dalvik_read_instr_aget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'and-int'. */
-GArchInstruction *dalvik_read_instr_and_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_and_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'and-int/2addr'. */
-GArchInstruction *dalvik_read_instr_and_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_and_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'and-int/lit8'. */
-GArchInstruction *dalvik_read_instr_and_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_and_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'and-int/lit16'. */
-GArchInstruction *dalvik_read_instr_and_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_and_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aput'. */
-GArchInstruction *dalvik_read_instr_aput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aput-boolean'. */
-GArchInstruction *dalvik_read_instr_aput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aput-byte'. */
-GArchInstruction *dalvik_read_instr_aput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aput-char'. */
-GArchInstruction *dalvik_read_instr_aput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aput-object'. */
-GArchInstruction *dalvik_read_instr_aput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aput-short'. */
-GArchInstruction *dalvik_read_instr_aput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'aput-wide'. */
-GArchInstruction *dalvik_read_instr_aput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_aput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'array-length'. */
-GArchInstruction *dalvik_read_instr_array_length(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_array_length(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'check-cast'. */
-GArchInstruction *dalvik_read_instr_check_cast(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_check_cast(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'cmp-long'. */
-GArchInstruction *dalvik_read_instr_cmp_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_cmp_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'cmpg-double'. */
-GArchInstruction *dalvik_read_instr_cmpg_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_cmpg_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'cmpg-float'. */
-GArchInstruction *dalvik_read_instr_cmpg_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_cmpg_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'cmpl-double'. */
-GArchInstruction *dalvik_read_instr_cmpl_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_cmpl_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'cmpl-float'. */
-GArchInstruction *dalvik_read_instr_cmpl_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_cmpl_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const'. */
-GArchInstruction *dalvik_read_instr_const(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const/16'. */
-GArchInstruction *dalvik_read_instr_const_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const/4'. */
-GArchInstruction *dalvik_read_instr_const_4(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_4(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const-class'. */
-GArchInstruction *dalvik_read_instr_const_class(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_class(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const/high16'. */
-GArchInstruction *dalvik_read_instr_const_high16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_high16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const-string'. */
-GArchInstruction *dalvik_read_instr_const_string(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_string(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const-string/jumbo'. */
-GArchInstruction *dalvik_read_instr_const_string_jumbo(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_string_jumbo(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const-wide'. */
-GArchInstruction *dalvik_read_instr_const_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const-wide/16'. */
-GArchInstruction *dalvik_read_instr_const_wide_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_wide_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const-wide/32'. */
-GArchInstruction *dalvik_read_instr_const_wide_32(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_wide_32(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'const-wide/high16'. */
-GArchInstruction *dalvik_read_instr_const_wide_high16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_const_wide_high16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'div-int'. */
-GArchInstruction *dalvik_read_instr_div_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_div_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'div-int/2addr'. */
-GArchInstruction *dalvik_read_instr_div_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_div_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'div-int/lit8'. */
-GArchInstruction *dalvik_read_instr_div_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_div_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'div-int/lit16'. */
-GArchInstruction *dalvik_read_instr_div_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_div_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'div-long'. */
-GArchInstruction *dalvik_read_instr_div_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_div_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'fill-array-data'. */
-GArchInstruction *dalvik_read_instr_fill_array_data(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_fill_array_data(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'goto'. */
-GArchInstruction *dalvik_read_instr_goto(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_goto(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'goto/16'. */
-GArchInstruction *dalvik_read_instr_goto_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_goto_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'goto/32'. */
-GArchInstruction *dalvik_read_instr_goto_32(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_goto_32(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-eq'. */
-GArchInstruction *dalvik_read_instr_if_eq(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_eq(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-eqz'. */
-GArchInstruction *dalvik_read_instr_if_eqz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_eqz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-ge'. */
-GArchInstruction *dalvik_read_instr_if_ge(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_ge(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-gez'. */
-GArchInstruction *dalvik_read_instr_if_gez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_gez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-gt'. */
-GArchInstruction *dalvik_read_instr_if_gt(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_gt(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-gtz'. */
-GArchInstruction *dalvik_read_instr_if_gtz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_gtz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-le'. */
-GArchInstruction *dalvik_read_instr_if_le(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_le(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-lez'. */
-GArchInstruction *dalvik_read_instr_if_lez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_lez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-lt'. */
-GArchInstruction *dalvik_read_instr_if_lt(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_lt(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-ltz'. */
-GArchInstruction *dalvik_read_instr_if_ltz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_ltz(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-ne'. */
-GArchInstruction *dalvik_read_instr_if_ne(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_ne(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'if-nez'. */
-GArchInstruction *dalvik_read_instr_if_nez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_if_nez(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iget'. */
-GArchInstruction *dalvik_read_instr_iget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iget-boolean'. */
-GArchInstruction *dalvik_read_instr_iget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iget-byte'. */
-GArchInstruction *dalvik_read_instr_iget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iget-char'. */
-GArchInstruction *dalvik_read_instr_iget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iget-object'. */
-GArchInstruction *dalvik_read_instr_iget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iget-short'. */
-GArchInstruction *dalvik_read_instr_iget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iget-wide'. */
-GArchInstruction *dalvik_read_instr_iget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-direct'. */
-GArchInstruction *dalvik_read_instr_invoke_direct(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_direct(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-direct/range'. */
-GArchInstruction *dalvik_read_instr_invoke_direct_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_direct_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-interface'. */
-GArchInstruction *dalvik_read_instr_invoke_interface(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_interface(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-interface/range'. */
-GArchInstruction *dalvik_read_instr_invoke_interface_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_interface_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-static'. */
-GArchInstruction *dalvik_read_instr_invoke_static(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_static(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-static/range'. */
-GArchInstruction *dalvik_read_instr_invoke_static_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_static_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-super'. */
-GArchInstruction *dalvik_read_instr_invoke_super(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_super(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-super/range'. */
-GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_super_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-virtual'. */
-GArchInstruction *dalvik_read_instr_invoke_virtual(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_virtual(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'invoke-virtual/range'. */
-GArchInstruction *dalvik_read_instr_invoke_virtual_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_invoke_virtual_range(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iput'. */
-GArchInstruction *dalvik_read_instr_iput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iput-boolean'. */
-GArchInstruction *dalvik_read_instr_iput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iput-byte'. */
-GArchInstruction *dalvik_read_instr_iput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iput-char'. */
-GArchInstruction *dalvik_read_instr_iput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iput-object'. */
-GArchInstruction *dalvik_read_instr_iput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iput-short'. */
-GArchInstruction *dalvik_read_instr_iput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'iput-wide'. */
-GArchInstruction *dalvik_read_instr_iput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_iput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move'. */
-GArchInstruction *dalvik_read_instr_move(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move-exception'. */
-GArchInstruction *dalvik_read_instr_move_exception(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_exception(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move/from16'. */
-GArchInstruction *dalvik_read_instr_move_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move-object'. */
-GArchInstruction *dalvik_read_instr_move_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move-object/from16'. */
-GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_object_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move-result'. */
-GArchInstruction *dalvik_read_instr_move_result(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_result(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move-result-object'. */
-GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_result_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move-result-wide'. */
-GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_result_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'move-wide/from16'. */
-GArchInstruction *dalvik_read_instr_move_wide_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_move_wide_from_16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'mul-double/2addr'. */
-GArchInstruction *dalvik_read_instr_mul_double_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_mul_double_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'mul-int'. */
-GArchInstruction *dalvik_read_instr_mul_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_mul_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'mul-int/2addr'. */
-GArchInstruction *dalvik_read_instr_mul_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_mul_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'mul-int/lit8'. */
-GArchInstruction *dalvik_read_instr_mul_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_mul_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'mul-int/lit16'. */
-GArchInstruction *dalvik_read_instr_mul_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_mul_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'mul-long'. */
-GArchInstruction *dalvik_read_instr_mul_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_mul_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'new-array'. */
-GArchInstruction *dalvik_read_instr_new_array(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_new_array(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'new-instance'. */
-GArchInstruction *dalvik_read_instr_new_instance(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_new_instance(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'nop'. */
-GArchInstruction *dalvik_read_instr_nop(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_nop(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'or-int'. */
-GArchInstruction *dalvik_read_instr_or_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_or_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'or-int/2addr'. */
-GArchInstruction *dalvik_read_instr_or_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_or_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'or-int/lit8'. */
-GArchInstruction *dalvik_read_instr_or_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_or_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'or-int/lit16'. */
-GArchInstruction *dalvik_read_instr_or_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_or_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'packed-switch'. */
-GArchInstruction *dalvik_read_instr_packed_switch(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_packed_switch(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'rem-int'. */
-GArchInstruction *dalvik_read_instr_rem_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_rem_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'rem-int/2addr'. */
-GArchInstruction *dalvik_read_instr_rem_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_rem_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'rem-int/lit8'. */
-GArchInstruction *dalvik_read_instr_rem_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_rem_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'rem-int/lit16'. */
-GArchInstruction *dalvik_read_instr_rem_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_rem_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'rsub-int'. */
-GArchInstruction *dalvik_read_instr_rsub_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_rsub_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'rsub-int/lit8'. */
-GArchInstruction *dalvik_read_instr_rsub_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_rsub_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'return'. */
-GArchInstruction *dalvik_read_instr_return(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_return(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'return-object'. */
-GArchInstruction *dalvik_read_instr_return_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_return_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'return-void'. */
-GArchInstruction *dalvik_read_instr_return_void(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_return_void(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'return-wide'. */
-GArchInstruction *dalvik_read_instr_return_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_return_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sget'. */
-GArchInstruction *dalvik_read_instr_sget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sget(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sget-boolean'. */
-GArchInstruction *dalvik_read_instr_sget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sget_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sget-byte'. */
-GArchInstruction *dalvik_read_instr_sget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sget_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sget-char'. */
-GArchInstruction *dalvik_read_instr_sget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sget_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sget-object'. */
-GArchInstruction *dalvik_read_instr_sget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sget_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sget-short'. */
-GArchInstruction *dalvik_read_instr_sget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sget_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sget-wide'. */
-GArchInstruction *dalvik_read_instr_sget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sget_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shl-int'. */
-GArchInstruction *dalvik_read_instr_shl_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shl_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shl-int/2addr'. */
-GArchInstruction *dalvik_read_instr_shl_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shl_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shl-int/lit8'. */
-GArchInstruction *dalvik_read_instr_shl_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shl_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shl-long'. */
-GArchInstruction *dalvik_read_instr_shl_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shl_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shl-long/2addr'. */
-GArchInstruction *dalvik_read_instr_shl_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shl_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shr-int'. */
-GArchInstruction *dalvik_read_instr_shr_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shr_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shr-int/2addr'. */
-GArchInstruction *dalvik_read_instr_shr_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shr_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shr-int/lit8'. */
-GArchInstruction *dalvik_read_instr_shr_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shr_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shr-long'. */
-GArchInstruction *dalvik_read_instr_shr_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shr_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'shr-long/2addr'. */
-GArchInstruction *dalvik_read_instr_shr_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_shr_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sparse-switch'. */
-GArchInstruction *dalvik_read_instr_sparse_switch(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sparse_switch(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sput'. */
-GArchInstruction *dalvik_read_instr_sput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sput(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sput-boolean'. */
-GArchInstruction *dalvik_read_instr_sput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sput_boolean(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sput-byte'. */
-GArchInstruction *dalvik_read_instr_sput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sput_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sput-char'. */
-GArchInstruction *dalvik_read_instr_sput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sput_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sput-object'. */
-GArchInstruction *dalvik_read_instr_sput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sput_object(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sput-short'. */
-GArchInstruction *dalvik_read_instr_sput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sput_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sput-wide'. */
-GArchInstruction *dalvik_read_instr_sput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sput_wide(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'sub-int'. */
-GArchInstruction *dalvik_read_instr_sub_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_sub_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'int-to-byte'. */
-GArchInstruction *dalvik_read_instr_to_int_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_int_byte(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'int-to-char'. */
-GArchInstruction *dalvik_read_instr_to_int_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_int_char(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'int-to-double'. */
-GArchInstruction *dalvik_read_instr_to_int_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_int_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'int-to-float'. */
-GArchInstruction *dalvik_read_instr_to_int_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_int_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'int-to-long'. */
-GArchInstruction *dalvik_read_instr_to_int_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_int_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'int-to-short'. */
-GArchInstruction *dalvik_read_instr_to_int_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_int_short(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'double-to-float'. */
-GArchInstruction *dalvik_read_instr_to_double_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_double_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'double-to-int'. */
-GArchInstruction *dalvik_read_instr_to_double_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_double_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'double-to-long'. */
-GArchInstruction *dalvik_read_instr_to_double_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_double_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'float-to-double'. */
-GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'float-to-int'. */
-GArchInstruction *dalvik_read_instr_to_float_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_float_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'float-to-long'. */
-GArchInstruction *dalvik_read_instr_to_float_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_float_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'long-to-double'. */
-GArchInstruction *dalvik_read_instr_to_long_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_long_double(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'long-to-float'. */
-GArchInstruction *dalvik_read_instr_to_long_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_long_float(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'long-to-int'. */
-GArchInstruction *dalvik_read_instr_to_long_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_to_long_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'ushr-int'. */
-GArchInstruction *dalvik_read_instr_ushr_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_ushr_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'ushr-int/2addr'. */
-GArchInstruction *dalvik_read_instr_ushr_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_ushr_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'ushr-int/lit8'. */
-GArchInstruction *dalvik_read_instr_ushr_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_ushr_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'ushr-long'. */
-GArchInstruction *dalvik_read_instr_ushr_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_ushr_long(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'ushr-long/2addr'. */
-GArchInstruction *dalvik_read_instr_ushr_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_ushr_long_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
@@ -603,16 +604,16 @@ GArchInstruction *dalvik_read_instr_ushr_long_2addr(const bin_t *, off_t *, off_
/* Décode une instruction de type 'xor-int'. */
-GArchInstruction *dalvik_read_instr_xor_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_xor_int(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'xor-int/2addr'. */
-GArchInstruction *dalvik_read_instr_xor_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_xor_int_2addr(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'xor-int/lit8'. */
-GArchInstruction *dalvik_read_instr_xor_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_xor_int_lit8(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
/* Décode une instruction de type 'xor-int/lit16'. */
-GArchInstruction *dalvik_read_instr_xor_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *);
+GArchInstruction *dalvik_read_instr_xor_int_lit16(const bin_t *, off_t *, off_t, vmpa_t, const GDalvikProcessor *, const GDexFormat *);
diff --git a/src/arch/dalvik/opcodes/or.c b/src/arch/dalvik/opcodes/or.c
index e22e258..0089190 100644
--- a/src/arch/dalvik/opcodes/or.c
+++ b/src/arch/dalvik/opcodes/or.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* or.c - décodage des opérations de OU logiques
*
- * 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 'or-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_or_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_or_int(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_or_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_or_int(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 'or-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_or_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_or_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_or_int_2addr(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_or_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_or_int_2addr(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 'or-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_or_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_or_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_or_int_lit8(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_or_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_or_int_lit8(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 'or-int/lit16'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_or_int_lit8(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_or_int_lit16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_or_int_lit16(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_or_int_lit16(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/rem.c b/src/arch/dalvik/opcodes/rem.c
index d274868..fb73e50 100644
--- a/src/arch/dalvik/opcodes/rem.c
+++ b/src/arch/dalvik/opcodes/rem.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* rem.c - décodage des opérations de restes de division
*
- * 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 'rem-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_rem_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_rem_int(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_rem_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_rem_int(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 'rem-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_rem_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_rem_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_rem_int_2addr(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_rem_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_rem_int_2addr(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 'rem-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_rem_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_rem_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_rem_int_lit8(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_rem_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_rem_int_lit8(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 'rem-int/lit16'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_rem_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_rem_int_lit16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_rem_int_lit16(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_rem_int_lit16(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/ret.c b/src/arch/dalvik/opcodes/ret.c
index 2605b79..fbae8ff 100644
--- a/src/arch/dalvik/opcodes/ret.c
+++ b/src/arch/dalvik/opcodes/ret.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* ret.c - décodage des ordres de retour
*
- * 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 'return'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_return(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_return(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_return(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_11X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_return(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 'return-object'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_return(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_return_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_return_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 */
@@ -90,7 +92,7 @@ GArchInstruction *dalvik_read_instr_return_object(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_11X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_return_object(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 'return-void'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_return_object(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_return_void(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_return_void(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_return_void(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_10X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_10X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_return_void(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 'return-wide'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_return_void(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_return_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_return_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 */
@@ -162,7 +166,7 @@ GArchInstruction *dalvik_read_instr_return_wide(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_11X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_11X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/rsub.c b/src/arch/dalvik/opcodes/rsub.c
index 84baf44..37434eb 100644
--- a/src/arch/dalvik/opcodes/rsub.c
+++ b/src/arch/dalvik/opcodes/rsub.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* rsub.c - décodage des opérations de soustractions inverses
*
- * 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 'rsub-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_rsub_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_rsub_int(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_rsub_int(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_rsub_int(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 'rsub-int/lit8'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_rsub_int(const bin_t *data, off_t *pos, off_
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_rsub_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_rsub_int_lit8(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_rsub_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
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;
diff --git a/src/arch/dalvik/opcodes/shl.c b/src/arch/dalvik/opcodes/shl.c
index 874c734..a7a08f7 100644
--- a/src/arch/dalvik/opcodes/shl.c
+++ b/src/arch/dalvik/opcodes/shl.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* shl.c - décodage des opérations de décalage à gauche
*
- * Copyright (C) 2011 Cyrille Bagard
+ * Copyright (C) 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 'shl-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shl_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shl_int(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_shl_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_shl_int(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 'shl-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_shl_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shl_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shl_int_2addr(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_shl_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_shl_int_2addr(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 'shl-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_shl_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shl_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shl_int_lit8(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_shl_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_shl_int_lit8(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 'shl-long'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_shl_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shl_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shl_long(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_shl_long(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_shl_long(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 'shl-long/2addr'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_shl_long(const bin_t *data, off_t *pos, off_
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shl_long_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shl_long_2addr(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_shl_long_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/shr.c b/src/arch/dalvik/opcodes/shr.c
index 203498e..f665f64 100644
--- a/src/arch/dalvik/opcodes/shr.c
+++ b/src/arch/dalvik/opcodes/shr.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* shr.c - décodage des opérations de décalage à droite signé
*
- * Copyright (C) 2011 Cyrille Bagard
+ * Copyright (C) 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 'shr-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shr_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shr_int(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_shr_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_shr_int(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 'shr-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_shr_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shr_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shr_int_2addr(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_shr_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_shr_int_2addr(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 'shr-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_shr_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shr_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shr_int_lit8(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_shr_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_shr_int_lit8(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 'shr-long'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_shr_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shr_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shr_long(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_shr_long(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_shr_long(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 'shr-long/2addr'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_shr_long(const bin_t *data, off_t *pos, off_
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_shr_long_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_shr_long_2addr(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_shr_long_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/sput.c b/src/arch/dalvik/opcodes/sput.c
index 8aa59e8..0ea032f 100644
--- a/src/arch/dalvik/opcodes/sput.c
+++ b/src/arch/dalvik/opcodes/sput.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* sput.c - décodage des instructions manipulant des champs statiques (enregistrement)
*
- * 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 'sput'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sput(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sput(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_sput(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_sput(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 'sput-boolean'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_sput(const bin_t *data, off_t *pos, off_t le
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sput_boolean(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sput_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_sput_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_sput_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 'sput-byte'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_sput_boolean(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sput_byte(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sput_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_sput_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_sput_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 'sput-char'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_sput_byte(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sput_char(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sput_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_sput_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_sput_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 'sput-object'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_sput_char(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sput_object(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sput_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_sput_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_sput_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 'sput-short'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_sput_object(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sput_short(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sput_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_sput_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_sput_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 'sput-wide'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_sput_short(const bin_t *data, off_t *pos, of
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sput_wide(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sput_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_sput_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;
diff --git a/src/arch/dalvik/opcodes/sub.c b/src/arch/dalvik/opcodes/sub.c
index dec31f5..8d42899 100644
--- a/src/arch/dalvik/opcodes/sub.c
+++ b/src/arch/dalvik/opcodes/sub.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* sub.c - décodage des opérations de soustraction
*
- * 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 'sub-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sub_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sub_int(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_sub_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/switch.c b/src/arch/dalvik/opcodes/switch.c
index 0f73b25..0feef9a 100644
--- a/src/arch/dalvik/opcodes/switch.c
+++ b/src/arch/dalvik/opcodes/switch.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* array.c - décodage de l'opération récupérant la longueur d'un tableau
*
- * Copyright (C) 2011 Cyrille Bagard
+ * Copyright (C) 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 'packed-switch'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_packed_switch(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_packed_switch(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_packed_switch(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_31T))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_31T))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_packed_switch(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 'sparse-switch'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_packed_switch(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_sparse_switch(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_sparse_switch(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_sparse_switch(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_31T))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_31T))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/to.c b/src/arch/dalvik/opcodes/to.c
index 879ed07..809dc1f 100644
--- a/src/arch/dalvik/opcodes/to.c
+++ b/src/arch/dalvik/opcodes/to.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* to.c - décodage des instructions de conversions forcées
*
- * 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 'int-to-byte'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_int_byte(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_int_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 */
@@ -54,7 +55,7 @@ GArchInstruction *dalvik_read_instr_to_int_byte(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_to_int_byte(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 'int-to-char'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_to_int_byte(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_int_char(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_int_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 */
@@ -90,7 +92,7 @@ GArchInstruction *dalvik_read_instr_to_int_char(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_to_int_char(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 'int-to-double'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_to_int_char(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_int_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_int_double(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_to_int_double(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_to_int_double(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 'int-to-float'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_to_int_double(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_int_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_int_float(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_to_int_float(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_to_int_float(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 'int-to-long'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_to_int_float(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_int_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_int_long(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_to_int_long(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -216,6 +221,7 @@ GArchInstruction *dalvik_read_instr_to_int_long(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 'int-to-short'. *
* *
@@ -225,7 +231,7 @@ GArchInstruction *dalvik_read_instr_to_int_long(const bin_t *data, off_t *pos, o
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_int_short(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_int_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_to_int_short(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -252,6 +258,7 @@ GArchInstruction *dalvik_read_instr_to_int_short(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 'double-to-float'. *
* *
@@ -261,7 +268,7 @@ GArchInstruction *dalvik_read_instr_to_int_short(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_double_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_double_float(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_to_double_float(const bin_t *data, off_t *po
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -288,6 +295,7 @@ GArchInstruction *dalvik_read_instr_to_double_float(const bin_t *data, off_t *po
* 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 'double-to-int'. *
* *
@@ -297,7 +305,7 @@ GArchInstruction *dalvik_read_instr_to_double_float(const bin_t *data, off_t *po
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_double_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_double_int(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 */
@@ -306,7 +314,7 @@ GArchInstruction *dalvik_read_instr_to_double_int(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -324,6 +332,7 @@ GArchInstruction *dalvik_read_instr_to_double_int(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 'double-to-long'. *
* *
@@ -333,7 +342,7 @@ GArchInstruction *dalvik_read_instr_to_double_int(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_double_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_double_long(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 */
@@ -342,7 +351,7 @@ GArchInstruction *dalvik_read_instr_to_double_long(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -360,6 +369,7 @@ GArchInstruction *dalvik_read_instr_to_double_long(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 'float-to-double'. *
* *
@@ -369,7 +379,7 @@ GArchInstruction *dalvik_read_instr_to_double_long(const bin_t *data, off_t *pos
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_float_double(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 */
@@ -378,7 +388,7 @@ GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *data, off_t *po
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -396,6 +406,7 @@ GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *data, off_t *po
* 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 'float-to-int'. *
* *
@@ -405,7 +416,7 @@ GArchInstruction *dalvik_read_instr_to_float_double(const bin_t *data, off_t *po
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_float_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_float_int(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 */
@@ -414,7 +425,7 @@ GArchInstruction *dalvik_read_instr_to_float_int(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -432,6 +443,7 @@ GArchInstruction *dalvik_read_instr_to_float_int(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 'float-to-long'. *
* *
@@ -441,7 +453,7 @@ GArchInstruction *dalvik_read_instr_to_float_int(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_float_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_float_long(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 */
@@ -450,7 +462,7 @@ GArchInstruction *dalvik_read_instr_to_float_long(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -468,6 +480,7 @@ GArchInstruction *dalvik_read_instr_to_float_long(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 'long-to-double'. *
* *
@@ -477,7 +490,7 @@ GArchInstruction *dalvik_read_instr_to_float_long(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_long_double(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_long_double(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 */
@@ -486,7 +499,7 @@ GArchInstruction *dalvik_read_instr_to_long_double(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -504,6 +517,7 @@ GArchInstruction *dalvik_read_instr_to_long_double(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 'long-to-float'. *
* *
@@ -513,7 +527,7 @@ GArchInstruction *dalvik_read_instr_to_long_double(const bin_t *data, off_t *pos
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_long_float(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_long_float(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 */
@@ -522,7 +536,7 @@ GArchInstruction *dalvik_read_instr_to_long_float(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -540,6 +554,7 @@ GArchInstruction *dalvik_read_instr_to_long_float(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 'long-to-int'. *
* *
@@ -549,7 +564,7 @@ GArchInstruction *dalvik_read_instr_to_long_float(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_to_long_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_to_long_int(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 */
@@ -558,7 +573,7 @@ GArchInstruction *dalvik_read_instr_to_long_int(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/ushr.c b/src/arch/dalvik/opcodes/ushr.c
index 39c033f..b5a9b00 100644
--- a/src/arch/dalvik/opcodes/ushr.c
+++ b/src/arch/dalvik/opcodes/ushr.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* ushr.c - décodage des opérations de décalage à droite non signé
*
- * Copyright (C) 2011 Cyrille Bagard
+ * Copyright (C) 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 'ushr-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_ushr_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_ushr_int(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_ushr_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_ushr_int(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 'ushr-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_ushr_int(const bin_t *data, off_t *pos, off_
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_ushr_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_ushr_int_2addr(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_ushr_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_ushr_int_2addr(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 'ushr-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_ushr_int_2addr(const bin_t *data, off_t *pos
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_ushr_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_ushr_int_lit8(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_ushr_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_ushr_int_lit8(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 'ushr-long'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_ushr_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_ushr_long(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_ushr_long(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_ushr_long(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -180,6 +184,7 @@ GArchInstruction *dalvik_read_instr_ushr_long(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 'ushr-long/2addr'. *
* *
@@ -189,7 +194,7 @@ GArchInstruction *dalvik_read_instr_ushr_long(const bin_t *data, off_t *pos, off
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_ushr_long_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_ushr_long_2addr(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_ushr_long_2addr(const bin_t *data, off_t *po
endian = g_arch_processor_get_endianness(G_ARCH_PROCESSOR(proc));
- if (!dalvik_read_operands(result, data, pos, len, endian, DALVIK_OPT_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/opcodes/xor.c b/src/arch/dalvik/opcodes/xor.c
index aff7549..52b0b0f 100644
--- a/src/arch/dalvik/opcodes/xor.c
+++ b/src/arch/dalvik/opcodes/xor.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* xor.c - décodage des opérations de OU exclusifs et logiques
*
- * 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 'xor-int'. *
* *
@@ -45,7 +46,7 @@
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_xor_int(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_xor_int(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_xor_int(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_23X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_23X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -72,6 +73,7 @@ GArchInstruction *dalvik_read_instr_xor_int(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 'xor-int/2addr'. *
* *
@@ -81,7 +83,7 @@ GArchInstruction *dalvik_read_instr_xor_int(const bin_t *data, off_t *pos, off_t
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_xor_int_2addr(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_xor_int_2addr(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_xor_int_2addr(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_12X))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_12X))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -108,6 +110,7 @@ GArchInstruction *dalvik_read_instr_xor_int_2addr(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 'xor-int/lit8'. *
* *
@@ -117,7 +120,7 @@ GArchInstruction *dalvik_read_instr_xor_int_2addr(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_xor_int_lit8(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_xor_int_lit8(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_xor_int_lit8(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_22B))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22B))
{
g_object_unref(G_OBJECT(result));
return NULL;
@@ -144,6 +147,7 @@ GArchInstruction *dalvik_read_instr_xor_int_lit8(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 'xor-int/lit16'. *
* *
@@ -153,7 +157,7 @@ GArchInstruction *dalvik_read_instr_xor_int_lit8(const bin_t *data, off_t *pos,
* *
******************************************************************************/
-GArchInstruction *dalvik_read_instr_xor_int_lit16(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, const GDalvikProcessor *proc)
+GArchInstruction *dalvik_read_instr_xor_int_lit16(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_xor_int_lit16(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_22S))
+ if (!dalvik_read_operands(result, fmt, data, pos, len, endian, DALVIK_OPT_22S))
{
g_object_unref(G_OBJECT(result));
return NULL;
diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c
index 65efd31..a48a5ce 100644
--- a/src/arch/dalvik/operand.c
+++ b/src/arch/dalvik/operand.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* operand.c - aide à la création d'opérandes Dalvik
*
- * Copyright (C) 2010-2011 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -56,19 +56,20 @@ typedef enum _DalvikOperandID
/* Procède à la lecture d'opérandes pour une instruction. */
-static bool dalvik_read_basic_operands(GArchInstruction *, const bin_t *, off_t *, off_t, bool *, SourceEndian, DalvikOperandType, va_list);
+static bool dalvik_read_basic_operands(GArchInstruction *, const GDexFormat *, const bin_t *, off_t *, off_t, bool *, SourceEndian, DalvikOperandType, va_list);
/* Procède à la lecture d'opérandes pour une instruction. */
-static bool dalvik_read_fixed_operands(GArchInstruction *, const bin_t *, off_t *, off_t, bool *, SourceEndian, DalvikOperandType);
+static bool dalvik_read_fixed_operands(GArchInstruction *, const GDexFormat *, const bin_t *, off_t *, off_t, bool *, SourceEndian, DalvikOperandType);
/* Procède à la lecture d'opérandes pour une instruction. */
-static bool dalvik_read_variatic_operands(GArchInstruction *, const bin_t *, off_t *, off_t, bool *, SourceEndian, DalvikOperandType);
+static bool dalvik_read_variatic_operands(GArchInstruction *, const GDexFormat *, const bin_t *, off_t *, off_t, bool *, SourceEndian, DalvikOperandType);
/******************************************************************************
* *
* Paramètres : instr = instruction dont la définition est incomplète. [OUT]*
+* format = format du fichier contenant le code. *
* data = flux de données à analyser. *
* pos = position courante dans ce flux. [OUT] *
* len = taille totale des données à analyser. *
@@ -85,7 +86,7 @@ static bool dalvik_read_variatic_operands(GArchInstruction *, const bin_t *, off
* *
******************************************************************************/
-static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *data, off_t *pos, off_t len, bool *low, SourceEndian endian, DalvikOperandType model, va_list ap)
+static bool dalvik_read_basic_operands(GArchInstruction *instr, const GDexFormat *format, const bin_t *data, off_t *pos, off_t len, bool *low, SourceEndian endian, DalvikOperandType model, va_list ap)
{
bool result; /* Bilan à retourner */
DalvikOperandID *types; /* Liste des chargements */
@@ -313,11 +314,11 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat
break;
case DOI_POOL_CONST:
- op = g_dalvik_pool_operand_new(DALVIK_OP_GET_POOL(model), data, pos, len, MDS_16_BITS, endian);
+ op = g_dalvik_pool_operand_new(format, DALVIK_OP_GET_POOL(model), data, pos, len, MDS_16_BITS, endian);
break;
case DOI_POOL_CONST_WIDE:
- op = g_dalvik_pool_operand_new(DALVIK_OP_GET_POOL(model), data, pos, len, MDS_32_BITS, endian);
+ op = g_dalvik_pool_operand_new(format, DALVIK_OP_GET_POOL(model), data, pos, len, MDS_32_BITS, endian);
break;
case DOI_TARGET_8:
@@ -351,6 +352,7 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat
/******************************************************************************
* *
* Paramètres : instr = instruction dont la définition est incomplète. [OUT]*
+* format = format du fichier contenant le code. *
* data = flux de données à analyser. *
* pos = position courante dans ce flux. [OUT] *
* len = taille totale des données à analyser. *
@@ -366,7 +368,7 @@ static bool dalvik_read_basic_operands(GArchInstruction *instr, const bin_t *dat
* *
******************************************************************************/
-static bool dalvik_read_fixed_operands(GArchInstruction *instr, const bin_t *data, off_t *pos, off_t len, bool *low, SourceEndian endian, DalvikOperandType model)
+static bool dalvik_read_fixed_operands(GArchInstruction *instr, const GDexFormat *format, const bin_t *data, off_t *pos, off_t len, bool *low, SourceEndian endian, DalvikOperandType model)
{
GArchOperand *opa; /* Opérande vA décodé */
uint8_t b; /* Nbre. de registres utilisés */
@@ -384,7 +386,7 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, const bin_t *dat
goto err_va;
- target1 = g_dalvik_pool_operand_new(DALVIK_OP_GET_POOL(model), data, pos, len, MDS_16_BITS, endian);
+ target1 = g_dalvik_pool_operand_new(format, DALVIK_OP_GET_POOL(model), data, pos, len, MDS_16_BITS, endian);
if (target1 == NULL) goto err_target1;
@@ -448,6 +450,7 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, const bin_t *dat
/******************************************************************************
* *
* Paramètres : instr = instruction dont la définition est incomplète. [OUT]*
+* format = format du fichier contenant le code. *
* data = flux de données à analyser. *
* pos = position courante dans ce flux. [OUT] *
* len = taille totale des données à analyser. *
@@ -463,7 +466,7 @@ static bool dalvik_read_fixed_operands(GArchInstruction *instr, const bin_t *dat
* *
******************************************************************************/
-static bool dalvik_read_variatic_operands(GArchInstruction *instr, const bin_t *data, off_t *pos, off_t len, bool *low, SourceEndian endian, DalvikOperandType model)
+static bool dalvik_read_variatic_operands(GArchInstruction *instr, const GDexFormat *format, const bin_t *data, off_t *pos, off_t len, bool *low, SourceEndian endian, DalvikOperandType model)
{
uint8_t a; /* Nbre. de registres utilisés */
uint16_t b; /* Indice dans la table const. */
@@ -479,7 +482,7 @@ static bool dalvik_read_variatic_operands(GArchInstruction *instr, const bin_t *
if (!read_u16(&b, data, pos, len, endian))
return false;
- target = g_dalvik_pool_operand_new(DALVIK_OP_GET_POOL(model), data, pos, len, MDS_16_BITS, endian);
+ target = g_dalvik_pool_operand_new(format, DALVIK_OP_GET_POOL(model), data, pos, len, MDS_16_BITS, endian);
if (target == NULL) return false;
/* Mise en place des arguments */
@@ -528,6 +531,7 @@ static bool dalvik_read_variatic_operands(GArchInstruction *instr, const bin_t *
/******************************************************************************
* *
* Paramètres : instr = instruction dont la définition est incomplète. [OUT]*
+* format = format du fichier contenant le code. *
* data = flux de données à analyser. *
* pos = position courante dans ce flux. [OUT] *
* len = taille totale des données à analyser. *
@@ -543,7 +547,7 @@ static bool dalvik_read_variatic_operands(GArchInstruction *instr, const bin_t *
* *
******************************************************************************/
-bool dalvik_read_operands(GArchInstruction *instr, const bin_t *data, off_t *pos, off_t len, SourceEndian endian, DalvikOperandType model, ...)
+bool dalvik_read_operands(GArchInstruction *instr, const GDexFormat *format, const bin_t *data, off_t *pos, off_t len, SourceEndian endian, DalvikOperandType model, ...)
{
bool result; /* Bilan à retourner */
@@ -589,18 +593,18 @@ bool dalvik_read_operands(GArchInstruction *instr, const bin_t *data, off_t *pos
case DALVIK_OPT_31T:
case DALVIK_OPT_51L:
va_start(ap, model);
- result = dalvik_read_basic_operands(instr, data, pos, len, &low, endian, model, ap);
+ result = dalvik_read_basic_operands(instr, format, data, pos, len, &low, endian, model, ap);
va_end(ap);
break;
case DALVIK_OPT_35C:
- result = dalvik_read_fixed_operands(instr, data, pos, len, &low, endian, model);
+ result = dalvik_read_fixed_operands(instr, format, data, pos, len, &low, endian, model);
break;
case DALVIK_OPT_3RC:
case DALVIK_OPT_3RMS:
case DALVIK_OPT_3RFS:
- result = dalvik_read_variatic_operands(instr, data, pos, len, &low, endian, model);
+ result = dalvik_read_variatic_operands(instr, format, data, pos, len, &low, endian, model);
break;
default:
diff --git a/src/arch/dalvik/operand.h b/src/arch/dalvik/operand.h
index b369787..fd95b52 100644
--- a/src/arch/dalvik/operand.h
+++ b/src/arch/dalvik/operand.h
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* operand.h - prototypes pour l'aide à la création d'opérandes Dalvik
*
- * Copyright (C) 2010-2011 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -30,6 +30,7 @@
#include "operands/register.h"
#include "operands/target.h"
#include "../instruction.h"
+#include "../../format/dex/dex.h"
@@ -109,7 +110,7 @@ typedef enum _DalvikOperandType
/* Procède à la lecture d'opérandes pour une instruction. */
-bool dalvik_read_operands(GArchInstruction *, const bin_t *, off_t *, off_t, SourceEndian, DalvikOperandType, ...);
+bool dalvik_read_operands(GArchInstruction *, const GDexFormat *, const bin_t *, off_t *, off_t, SourceEndian, DalvikOperandType, ...);
diff --git a/src/arch/dalvik/operands/pool.c b/src/arch/dalvik/operands/pool.c
index a7b264b..3e0a948 100644
--- a/src/arch/dalvik/operands/pool.c
+++ b/src/arch/dalvik/operands/pool.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* pool.c - opérandes pointant vers la table des constantes
*
- * Copyright (C) 2010 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -24,7 +24,11 @@
#include "pool.h"
+#include <string.h>
+
+
#include "../../operand-int.h"
+#include "../../../format/dex/pool.h"
@@ -33,6 +37,7 @@ struct _GDalvikPoolOperand
{
GArchOperand parent; /* Instance parente */
+ const GDexFormat *format; /* Lien vers le contenu réel */
DalvikPoolType type; /* Type de table visée */
uint32_t index; /* Indice de l'élément visé */
@@ -105,7 +110,8 @@ static void g_dalvik_pool_operand_init(GDalvikPoolOperand *operand)
/******************************************************************************
* *
-* Paramètres : type = type de table visée avec la référence. *
+* Paramètres : format = format du fichier contenant le code. *
+* type = type de table visée avec la référence. *
* data = flux de données à analyser. *
* pos = position courante dans ce flux. [OUT] *
* len = taille totale des données à analyser. *
@@ -120,7 +126,7 @@ static void g_dalvik_pool_operand_init(GDalvikPoolOperand *operand)
* *
******************************************************************************/
-GArchOperand *g_dalvik_pool_operand_new(DalvikPoolType type, const bin_t *data, off_t *pos, off_t len, MemoryDataSize size, SourceEndian endian)
+GArchOperand *g_dalvik_pool_operand_new(const GDexFormat *format, DalvikPoolType type, const bin_t *data, off_t *pos, off_t len, MemoryDataSize size, SourceEndian endian)
{
GDalvikPoolOperand *result; /* Structure à retourner */
uint8_t index8; /* Indice sur 8 bits */
@@ -145,6 +151,7 @@ GArchOperand *g_dalvik_pool_operand_new(DalvikPoolType type, const bin_t *data,
result = g_object_new(G_TYPE_DALVIK_POOL_OPERAND, NULL);
+ result->format = format;
result->type = type;
result->index = (size == MDS_8_BITS ? index8 : index16);
@@ -169,6 +176,8 @@ GArchOperand *g_dalvik_pool_operand_new(DalvikPoolType type, const bin_t *data,
static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBufferLine *line, AsmSyntax syntax)
{
+ const char *string; /* Chaîne de caractères */
+
char value[20]; /* Chaîne à imprimer */
size_t len; /* Taille de l'élément inséré */
@@ -178,7 +187,10 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
g_buffer_line_insert_text(line, BLC_ASSEMBLY, "????", 4, RTT_SECTION);
break;
case DPT_STRING:
- g_buffer_line_insert_text(line, BLC_ASSEMBLY, "string", 6, RTT_SECTION);
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING);
+ string = get_string_from_dex_pool(operand->format, operand->index);
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY, string, strlen(string), RTT_STRING);
+ g_buffer_line_insert_text(line, BLC_ASSEMBLY, "\"", 1, RTT_STRING);
break;
case DPT_TYPE:
g_buffer_line_insert_text(line, BLC_ASSEMBLY, "type", 4, RTT_SECTION);
@@ -194,6 +206,9 @@ static void g_dalvik_pool_operand_print(const GDalvikPoolOperand *operand, GBuff
break;
}
+ if (operand->type == DPT_STRING)
+ return;
+
g_buffer_line_insert_text(line, BLC_ASSEMBLY, "@", 1, RTT_SIGNS);
len = snprintf(value, 20, "%d", operand->index);
diff --git a/src/arch/dalvik/operands/pool.h b/src/arch/dalvik/operands/pool.h
index b74692d..3905664 100644
--- a/src/arch/dalvik/operands/pool.h
+++ b/src/arch/dalvik/operands/pool.h
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* pool.h - prototypes pour les opérandes pointant vers la table des constantes
*
- * Copyright (C) 2010 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -31,6 +31,7 @@
#include "../../operand.h"
#include "../../../common/endianness.h"
+#include "../../../format/dex/pool.h"
@@ -66,7 +67,7 @@ typedef enum _DalvikPoolType
GType g_dalvik_pool_operand_get_type(void);
/* Crée un opérande visant un élément constant Dalvik. */
-GArchOperand *g_dalvik_pool_operand_new(DalvikPoolType, const bin_t *, off_t *, off_t, MemoryDataSize, SourceEndian);
+GArchOperand *g_dalvik_pool_operand_new(const GDexFormat *, DalvikPoolType, const bin_t *, off_t *, off_t, MemoryDataSize, SourceEndian);
/* Indique la nature de la table de constantes visée ici. */
DalvikPoolType g_dalvik_pool_operand_get_pool_type(const GDalvikPoolOperand *);
diff --git a/src/arch/dalvik/processor.c b/src/arch/dalvik/processor.c
index 1304b8e..ca571c6 100644
--- a/src/arch/dalvik/processor.c
+++ b/src/arch/dalvik/processor.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* processor.c - manipulation du processeur de la VM Dalvik
*
- * Copyright (C) 2010-2011 Cyrille Bagard
+ * Copyright (C) 2010-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -62,7 +62,7 @@ static GDalvikContext *g_dalvik_processor_get_context(const GDalvikProcessor *);
static GArchInstruction *g_dalvik_guess_pseudo_instruction(const GDalvikProcessor *, const bin_t *, off_t *, off_t, vmpa_t);
/* Décode une instruction dans un flux de données. */
-static GArchInstruction *g_dalvik_processor_decode_instruction(const GDalvikProcessor *, GDalvikContext *, const bin_t *, off_t *, off_t, vmpa_t);
+static GArchInstruction *g_dalvik_processor_decode_instruction(const GDalvikProcessor *, GDalvikContext *, const bin_t *, off_t *, off_t, vmpa_t, GDexFormat *);
/* Indique le type défini par la GLib pour le processeur DALVIK. */
@@ -212,12 +212,13 @@ static GArchInstruction *g_dalvik_guess_pseudo_instruction(const GDalvikProcesso
/******************************************************************************
* *
-* Paramètres : proc = architecture visée par la procédure. *
-* ctx = contexte lié à l'exécution du processeur. *
-* data = flux de données à analyser. *
-* pos = position courante dans ce flux. [OUT] *
-* len = taille totale des données à analyser. *
-* addr = adresse virtuelle de l'instruction. *
+* Paramètres : proc = architecture visée par la procédure. *
+* ctx = contexte lié à l'exécution du processeur. *
+* data = flux de données à analyser. *
+* pos = position courante dans ce flux. [OUT] *
+* len = taille totale des données à analyser. *
+* addr = adresse virtuelle de l'instruction. *
+* format = format du fichier contenant le code. *
* *
* Description : Décode une instruction dans un flux de données. *
* *
@@ -227,7 +228,7 @@ static GArchInstruction *g_dalvik_guess_pseudo_instruction(const GDalvikProcesso
* *
******************************************************************************/
-static GArchInstruction *g_dalvik_processor_decode_instruction(const GDalvikProcessor *proc, GDalvikContext *ctx, const bin_t *data, off_t *pos, off_t len, vmpa_t addr)
+static GArchInstruction *g_dalvik_processor_decode_instruction(const GDalvikProcessor *proc, GDalvikContext *ctx, const bin_t *data, off_t *pos, off_t len, vmpa_t addr, GDexFormat *format)
{
GArchInstruction *result; /* Instruction à renvoyer */
DalvikOpcodes id; /* Identifiant d'instruction */
@@ -441,7 +442,7 @@ static GArchInstruction *g_dalvik_processor_decode_instruction(const GDalvikProc
if (id != DOP_COUNT)
{
(*pos)++;
- result = decodings[id](data, pos, len, addr, proc);
+ result = decodings[id](data, pos, len, addr, proc, format);
}
}
diff --git a/src/arch/processor-int.h b/src/arch/processor-int.h
index dab4d5c..f83ff49 100644
--- a/src/arch/processor-int.h
+++ b/src/arch/processor-int.h
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* processor.h - prototypes pour la définition générique interne des architectures
*
- * Copyright (C) 2008-2011 Cyrille Bagard
+ * Copyright (C) 2008-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -50,7 +50,7 @@
typedef GProcContext * (* get_processor_context_fc) (const GArchProcessor *);
/* Décode une instruction dans un flux de données. */
-typedef GArchInstruction * (* decode_instruction_fc) (const GArchProcessor *, GProcContext *, const bin_t *, off_t *, off_t, vmpa_t);
+typedef GArchInstruction * (* decode_instruction_fc) (const GArchProcessor *, GProcContext *, const bin_t *, off_t *, off_t, vmpa_t, GBinFormat *);
/* Définition générique d'un processeur d'architecture (instance) */
diff --git a/src/arch/processor.c b/src/arch/processor.c
index 41b9a66..6063f93 100644
--- a/src/arch/processor.c
+++ b/src/arch/processor.c
@@ -205,7 +205,8 @@ MemoryDataSize g_arch_processor_get_instruction_size(const GArchProcessor *proc)
* pos = position courante dans ce flux. [OUT] *
* len = taille totale des données à analyser. *
* base = position physique du bloc de code courant. *
-* offset = adresse virtuelle de l'instruction. *
+* addr = adresse virtuelle de l'instruction. *
+* format = format du fichier contenant le code. *
* *
* Description : Décode une instruction dans un flux de données. *
* *
@@ -215,7 +216,7 @@ MemoryDataSize g_arch_processor_get_instruction_size(const GArchProcessor *proc)
* *
******************************************************************************/
-GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *proc, GProcContext *ctx, const bin_t *data, off_t *pos, off_t len, off_t base, vmpa_t addr)
+GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *proc, GProcContext *ctx, const bin_t *data, off_t *pos, off_t len, off_t base, vmpa_t addr, GBinFormat *format)
{
GArchInstruction *result; /* Instruction à renvoyer */
off_t old_pos; /* Sauvegarde de la position */
@@ -223,7 +224,7 @@ GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *proc
old_pos = *pos;
- result = proc->decode(proc, ctx, data, pos, len, addr);
+ result = proc->decode(proc, ctx, data, pos, len, addr, format);
if (result == NULL || result == SKIPPED_INSTR)
{
diff --git a/src/arch/processor.h b/src/arch/processor.h
index d66fc7a..ab06c52 100644
--- a/src/arch/processor.h
+++ b/src/arch/processor.h
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* processor.h - prototypes pour la gestion générique des architectures
*
- * Copyright (C) 2008-2011 Cyrille Bagard
+ * Copyright (C) 2008-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -31,6 +31,7 @@
#include "context.h"
#include "instruction.h"
#include "../common/endianness.h"
+#include "../format/format.h"
@@ -63,7 +64,7 @@ MemoryDataSize g_arch_processor_get_memory_size(const GArchProcessor *);
MemoryDataSize g_arch_processor_get_instruction_size(const GArchProcessor *);
/* Décode une instruction dans un flux de données. */
-GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *, GProcContext *, const bin_t *, off_t *, off_t, off_t, vmpa_t);
+GArchInstruction *g_arch_processor_decode_instruction(const GArchProcessor *, GProcContext *, const bin_t *, off_t *, off_t, off_t, vmpa_t, GBinFormat *);
diff --git a/src/format/elf/helper_x86.c b/src/format/elf/helper_x86.c
index 7e795a1..fe31c19 100644
--- a/src/format/elf/helper_x86.c
+++ b/src/format/elf/helper_x86.c
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* helper_x86.c - gestion auxiliaire de l'architecture x86
*
- * Copyright (C) 2009-2011 Cyrille Bagard
+ * Copyright (C) 2009-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -220,7 +220,7 @@ GArchInstruction **decode_elf_relocations(GElfFormat *format, const elf_shdr *pl
address = plt_address + pos;
instr = g_arch_processor_decode_instruction(proc, NULL /*FIXME*/, &G_BIN_FORMAT(format)->content[plt_start],
- &pos, plt_size, 0/* FIXME*/, address);
+ &pos, plt_size, 0/* FIXME*/, address, NULL /*FIXME*/);
result = (GArchInstruction **)realloc(result, ++(*count) * sizeof(GArchInstruction *));
result[*count - 1] = instr;