summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2011-10-05 19:34:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2011-10-05 19:34:00 (GMT)
commite8d2795d9ec2c8845641863fc42ce39f9e92906b (patch)
tree722b96e48843335f45735a5d01a8dcf0114c870d /src/format
parent02cb3aa4e7b18b644b034a5c659c332becf99c9b (diff)
Supported a few more Dalvik opcodes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@211 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format')
-rw-r--r--src/format/part.c52
-rw-r--r--src/format/part.h10
2 files changed, 62 insertions, 0 deletions
diff --git a/src/format/part.c b/src/format/part.c
index 371c1ef..e42b8d2 100644
--- a/src/format/part.c
+++ b/src/format/part.c
@@ -41,6 +41,11 @@ struct _GBinPart
off_t size; /* Taille de la partie */
vmpa_t addr; /* Adresse associée */
+#ifdef DEBUG
+ unsigned int valid; /* Instructions reconnues */
+ unsigned int db; /* Instructions non traduites */
+#endif
+
};
/* Bloc de données binaires quelconques (classe) */
@@ -362,3 +367,50 @@ int g_binary_part_compare(const GBinPart **a, const GBinPart **b)
return result;
}
+
+#ifdef DEBUG
+
+/******************************************************************************
+* *
+* Paramètres : part = description de partie à mettre à jour. *
+* valid = quantité d'instructions décodées pour cette partie. *
+* db = quantité d'instructions non traduites ici. *
+* *
+* Description : Mémorise un bilan de désassemblage. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_binary_part_set_checkup(GBinPart *part, unsigned int valid, unsigned int db)
+{
+ part->valid = valid;
+ part->db = db;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : part = description de partie à mettre à jour. *
+* valid = quantité d'instructions décodées ici. [OUT] *
+* db = quantité d'instructions non traduites ici. [OUT] *
+* *
+* Description : Mémorise un bilan de désassemblage. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_binary_part_get_checkup(const GBinPart *part, unsigned int *valid, unsigned int *db)
+{
+ *valid = part->valid;
+ *db = part->db;
+
+}
+
+#endif
diff --git a/src/format/part.h b/src/format/part.h
index 32d1903..5adeb2b 100644
--- a/src/format/part.h
+++ b/src/format/part.h
@@ -82,6 +82,16 @@ void g_binary_part_get_values(const GBinPart *, off_t *, off_t *, vmpa_t *);
/* Etablit la comparaison entre deux blocs binaires. */
int g_binary_part_compare(const GBinPart **, const GBinPart **);
+#ifdef DEBUG
+
+/* Mémorise un bilan de désassemblage. */
+void g_binary_part_set_checkup(GBinPart *, unsigned int, unsigned int);
+
+/* Mémorise un bilan de désassemblage. */
+void g_binary_part_get_checkup(const GBinPart *, unsigned int *, unsigned int *);
+
+#endif
+
#endif /* _FORMAT_PART_H */