diff options
Diffstat (limited to 'plugins/readdex/code.c')
-rw-r--r-- | plugins/readdex/code.c | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/plugins/readdex/code.c b/plugins/readdex/code.c index 23e82ac..3a36c19 100644 --- a/plugins/readdex/code.c +++ b/plugins/readdex/code.c @@ -255,16 +255,16 @@ static fmt_field_def _dex_encoded_type_addr_pair[] = { /* Commente les définitions d'une protection contre exceptions. */ -static bool annotate_dex_try_item(const GDexFormat *, vmpa2t *); +static bool annotate_dex_try_item(const GDexFormat *, GPreloadInfo *, vmpa2t *); /*Commente les définitions des listes de gestion d'exceptions. */ -static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *, vmpa2t *); +static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *, GPreloadInfo *, vmpa2t *); /* Commente les définitions d'une prise en compte d'exceptions. */ -static bool annotate_dex_encoded_catch_handler(const GDexFormat *, vmpa2t *); +static bool annotate_dex_encoded_catch_handler(const GDexFormat *, GPreloadInfo *, vmpa2t *); /* Commente les définitions des gestions d'exceptions par type. */ -static bool annotate_dex_encoded_type_addr_pair(const GDexFormat *, vmpa2t *); +static bool annotate_dex_encoded_type_addr_pair(const GDexFormat *, GPreloadInfo *, vmpa2t *); @@ -379,6 +379,7 @@ static bool get_encoded_catch_handler_size_value(const fmt_field_def *def, GBinC /****************************************************************************** * * * Paramètres : format = description de l'exécutable à compléter. * +* info = informations à constituer en avance de phase. * * * * Description : Commente les définitions d'un corps de méthode. * * * @@ -388,7 +389,7 @@ static bool get_encoded_catch_handler_size_value(const fmt_field_def *def, GBinC * * ******************************************************************************/ -bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) +bool annotate_dex_code_item(const GDexFormat *format, GPreloadInfo *info, uleb128_t offset) { bool result; /* Bilan à retourner */ vmpa2t pos; /* Tête de lecture des symboles*/ @@ -400,7 +401,7 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) if (!result) goto adci_exit; - result = parse_field_definitions(PARSING_DEFS(_dex_code_item), G_BIN_FORMAT(format), &pos, &data); + result = parse_field_definitions(PARSING_DEFS(_dex_code_item), G_BIN_FORMAT(format), info, &pos, &data); if (!result) goto adci_exit; @@ -412,15 +413,16 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) /* padding */ if (data.insns_size % 2 != 0) - result = parse_field_definitions(PARSING_DEFS(_dex_code_item_padding), G_BIN_FORMAT(format), &pos, NULL); + result = parse_field_definitions(PARSING_DEFS(_dex_code_item_padding), + G_BIN_FORMAT(format), info, &pos, NULL); /* tries */ for (i = 0; i < data.tries_size && result; i++) - result = annotate_dex_try_item(format, &pos); + result = annotate_dex_try_item(format, info, &pos); if (data.tries_size > 0 && result) - result = annotate_dex_encoded_catch_handler_list(format, &pos); + result = annotate_dex_encoded_catch_handler_list(format, info, &pos); adci_exit: @@ -432,6 +434,7 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) /****************************************************************************** * * * Paramètres : format = description de l'exécutable à compléter. * +* info = informations à constituer en avance de phase. * * pos = tête de lecture pour les symboles. * * * * Description : Commente les définitions d'une protection contre exceptions. * @@ -442,11 +445,11 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) * * ******************************************************************************/ -static bool annotate_dex_try_item(const GDexFormat *format, vmpa2t *pos) +static bool annotate_dex_try_item(const GDexFormat *format, GPreloadInfo *info, vmpa2t *pos) { bool result; /* Bilan à retourner */ - result = parse_field_definitions(PARSING_DEFS(_dex_try_item), G_BIN_FORMAT(format), pos, NULL); + result = parse_field_definitions(PARSING_DEFS(_dex_try_item), G_BIN_FORMAT(format), info, pos, NULL); return result; @@ -456,6 +459,7 @@ static bool annotate_dex_try_item(const GDexFormat *format, vmpa2t *pos) /****************************************************************************** * * * Paramètres : format = description de l'exécutable à compléter. * +* info = informations à constituer en avance de phase. * * pos = tête de lecture physique des symboles. * * * * Description : Commente les définitions des listes de gestion d'exceptions. * @@ -466,17 +470,17 @@ static bool annotate_dex_try_item(const GDexFormat *format, vmpa2t *pos) * * ******************************************************************************/ -static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *format, vmpa2t *pos) +static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *format, GPreloadInfo *info, vmpa2t *pos) { bool result; /* Bilan à retourner */ uleb128_t size; /* Nombre d'entrées */ uleb128_t i; /* Boucle de parcours */ result = parse_field_definitions(PARSING_DEFS(_dex_encoded_catch_handler_list), - G_BIN_FORMAT(format), pos, &size); + G_BIN_FORMAT(format), info, pos, &size); for (i = 0; i < size && result; i++) - result = annotate_dex_encoded_catch_handler(format, pos); + result = annotate_dex_encoded_catch_handler(format, info, pos); return result; @@ -486,6 +490,7 @@ static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *format, vm /****************************************************************************** * * * Paramètres : format = description de l'exécutable à compléter. * +* info = informations à constituer en avance de phase. * * pos = tête de lecture physique des symboles. * * * * Description : Commente les définitions d'une prise en compte d'exceptions. * @@ -496,14 +501,15 @@ static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *format, vm * * ******************************************************************************/ -static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t *pos) +static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, GPreloadInfo *info, vmpa2t *pos) { bool result; /* Bilan à retourner */ leb128_t size; /* Nombre de gestionnaires */ bool has_catch_all; /* Gestion par défaut ? */ uleb128_t i; /* Boucle de parcours */ - result = parse_field_definitions(PARSING_DEFS(_dex_encoded_catch_handler), G_BIN_FORMAT(format), pos, &size); + result = parse_field_definitions(PARSING_DEFS(_dex_encoded_catch_handler), + G_BIN_FORMAT(format), info, pos, &size); if (!result) goto adech_exit; @@ -516,13 +522,13 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t /* handlers */ for (i = 0; i < size && result; i++) - result = annotate_dex_encoded_type_addr_pair(format, pos); + result = annotate_dex_encoded_type_addr_pair(format, info, pos); /* catch_all_addr */ if (result && has_catch_all) result = parse_field_definitions(PARSING_DEFS(_dex_encoded_catch_handler_all), - G_BIN_FORMAT(format), pos, &size); + G_BIN_FORMAT(format), info, pos, &size); adech_exit: @@ -534,6 +540,7 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t /****************************************************************************** * * * Paramètres : format = description de l'exécutable à compléter. * +* info = informations à constituer en avance de phase. * * pos = tête de lecture des symboles. * * * * Description : Commente les définitions des gestions d'exceptions par type. * @@ -544,11 +551,12 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t * * ******************************************************************************/ -static bool annotate_dex_encoded_type_addr_pair(const GDexFormat *format, vmpa2t *pos) +static bool annotate_dex_encoded_type_addr_pair(const GDexFormat *format, GPreloadInfo *info, vmpa2t *pos) { bool result; /* Bilan à retourner */ - result = parse_field_definitions(PARSING_DEFS(_dex_encoded_type_addr_pair), G_BIN_FORMAT(format), pos, NULL); + result = parse_field_definitions(PARSING_DEFS(_dex_encoded_type_addr_pair), + G_BIN_FORMAT(format), info, pos, NULL); return result; |