summaryrefslogtreecommitdiff
path: root/plugins/readdex/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/readdex/class.c')
-rw-r--r--plugins/readdex/class.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/plugins/readdex/class.c b/plugins/readdex/class.c
index 7b7b253..7911c6f 100644
--- a/plugins/readdex/class.c
+++ b/plugins/readdex/class.c
@@ -236,19 +236,20 @@ static fmt_field_def _dex_encoded_method[] = {
/* Commente les définitions des classes pour la VM Dalvik. */
-static bool annotate_dex_class_data(const GDexFormat *, const GDexClass *, uint32_t );
+static bool annotate_dex_class_data(const GDexFormat *, GPreloadInfo *, const GDexClass *, uint32_t );
/* Commente les définitions des champs encodés. */
-static bool annotate_dex_encoded_field(const GDexFormat *, vmpa2t *);
+static bool annotate_dex_encoded_field(const GDexFormat *, GPreloadInfo *, vmpa2t *);
/* Commente les définitions des méthodes encodées. */
-static bool annotate_dex_encoded_method(const GDexFormat *, const encoded_method *, vmpa2t *);
+static bool annotate_dex_encoded_method(const GDexFormat *, GPreloadInfo *, const encoded_method *, vmpa2t *);
/******************************************************************************
* *
* Paramètres : format = description de l'exécutable à compléter. *
+* info = informations à constituer en avance de phase. *
* status = barre de statut à tenir informée. *
* *
* Description : Commente les définitions des classes pour la VM Dalvik. *
@@ -259,7 +260,7 @@ static bool annotate_dex_encoded_method(const GDexFormat *, const encoded_method
* *
******************************************************************************/
-bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status)
+bool annotate_dex_class_defs(const GDexFormat *format, GPreloadInfo *info, GtkStatusStack *status)
{
bool result; /* Bilan à retourner */
const dex_header *header; /* En-tête principale */
@@ -284,7 +285,7 @@ bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status)
for (i = 0; i < header->class_defs_size && result; i++)
{
- result = parse_field_definitions(PARSING_DEFS(_dex_class_defs), bformat, &pos, NULL);
+ result = parse_field_definitions(PARSING_DEFS(_dex_class_defs), bformat, info, &pos, NULL);
if (!result) break;
/* Annotations supplémentaires */
@@ -294,7 +295,7 @@ bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status)
def = g_dex_class_get_definition(class);
if (def->class_data_off > 0)
- result = annotate_dex_class_data(format, class, def->class_data_off);
+ result = annotate_dex_class_data(format, info, class, def->class_data_off);
/* TODO : g_object_unref(G_OBJECT(class));*/
@@ -314,6 +315,7 @@ bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status)
/******************************************************************************
* *
* Paramètres : format = description de l'exécutable à compléter. *
+* info = informations à constituer en avance de phase. *
* class = classe Dex dont les données sont à commenter. *
* offset = tête de lecture physique des symboles. *
* *
@@ -325,7 +327,7 @@ bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status)
* *
******************************************************************************/
-static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *class, uint32_t offset)
+static bool annotate_dex_class_data(const GDexFormat *format, GPreloadInfo *info, const GDexClass *class, uint32_t offset)
{
bool result; /* Bilan à retourner */
vmpa2t pos; /* Tête de lecture des symboles*/
@@ -340,7 +342,7 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c
bformat = G_BIN_FORMAT(format);
- result = parse_field_definitions(PARSING_DEFS(_dex_class_data), bformat, &pos, NULL);
+ result = parse_field_definitions(PARSING_DEFS(_dex_class_data), bformat, info, &pos, NULL);
if (!result)
goto adcd_exit;
@@ -352,16 +354,16 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c
if (data != NULL)
{
for (i = 0; i < data->static_fields_size && result; i++)
- result = annotate_dex_encoded_field(format, &pos);
+ result = annotate_dex_encoded_field(format, info, &pos);
for (i = 0; i < data->instance_fields_size && result; i++)
- result = annotate_dex_encoded_field(format, &pos);
+ result = annotate_dex_encoded_field(format, info, &pos);
for (i = 0; i < data->direct_methods_size && result; i++)
- result = annotate_dex_encoded_method(format, &data->direct_methods[i], &pos);
+ result = annotate_dex_encoded_method(format, info, &data->direct_methods[i], &pos);
for (i = 0; i < data->virtual_methods_size && result; i++)
- result = annotate_dex_encoded_method(format, &data->virtual_methods[i], &pos);
+ result = annotate_dex_encoded_method(format, info, &data->virtual_methods[i], &pos);
}
@@ -375,6 +377,7 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c
/******************************************************************************
* *
* Paramètres : format = description de l'exécutable à compléter. *
+* info = informations à constituer en avance de phase. *
* pos = tête de lecture à faire progresser. [OUT] *
* *
* Description : Commente les définitions des champs encodés. *
@@ -385,14 +388,14 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c
* *
******************************************************************************/
-static bool annotate_dex_encoded_field(const GDexFormat *format, vmpa2t *pos)
+static bool annotate_dex_encoded_field(const GDexFormat *format, GPreloadInfo *info, vmpa2t *pos)
{
bool result; /* Bilan à retourner */
GBinFormat *bformat; /* Autre version du format */
bformat = G_BIN_FORMAT(format);
- result = parse_field_definitions(PARSING_DEFS(_dex_encoded_field), bformat, pos, NULL);
+ result = parse_field_definitions(PARSING_DEFS(_dex_encoded_field), bformat, info, pos, NULL);
return result;
@@ -402,6 +405,7 @@ static bool annotate_dex_encoded_field(const GDexFormat *format, vmpa2t *pos)
/******************************************************************************
* *
* Paramètres : format = description de l'exécutable à compléter. *
+* info = informations à constituer en avance de phase. *
* method = méthode à décrire. *
* pos = tête de lecture à faire progresser. [OUT] *
* *
@@ -413,19 +417,19 @@ static bool annotate_dex_encoded_field(const GDexFormat *format, vmpa2t *pos)
* *
******************************************************************************/
-static bool annotate_dex_encoded_method(const GDexFormat *format, const encoded_method *method, vmpa2t *pos)
+static bool annotate_dex_encoded_method(const GDexFormat *format, GPreloadInfo *info, const encoded_method *method, vmpa2t *pos)
{
bool result; /* Bilan à retourner */
GBinFormat *bformat; /* Autre version du format */
bformat = G_BIN_FORMAT(format);
- result = parse_field_definitions(PARSING_DEFS(_dex_encoded_method), bformat, pos, NULL);
+ result = parse_field_definitions(PARSING_DEFS(_dex_encoded_method), bformat, info, pos, NULL);
/* Chargements complémentaires, si non abstraite ni native */
if (result && method->code_off > 0)
- result = annotate_dex_code_item(format, method->code_off);
+ result = annotate_dex_code_item(format, info, method->code_off);
return result;