diff options
Diffstat (limited to 'src/format/dex/method.c')
| -rw-r--r-- | src/format/dex/method.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/src/format/dex/method.c b/src/format/dex/method.c index b74a713..316f094 100644 --- a/src/format/dex/method.c +++ b/src/format/dex/method.c @@ -294,6 +294,7 @@ GBinRoutine *g_dex_method_get_routine(const GDexMethod *method)  /******************************************************************************  *                                                                             *  *  Paramètres  : method = représentation interne du format DEX à consulter.   * +*                format = format permettant d'obtenir une adresse complète.   *  *                layer  = couche de portions à raffiner.                      *  *                                                                             *  *  Description : Intègre la méthode en tant que portion de code.              * @@ -304,16 +305,19 @@ GBinRoutine *g_dex_method_get_routine(const GDexMethod *method)  *                                                                             *  ******************************************************************************/ -void g_dex_method_include_as_portion(const GDexMethod *method, GPortionLayer *layer) +void g_dex_method_include_as_portion(const GDexMethod *method, const GDexFormat *format, GPortionLayer *layer)  { +    vmpa2t addr;                            /* Emplacement dans le binaire */      GBinPortion *new;                       /* Nouvelle portion définie    */      char *desc;                             /* Description d'une portion   */ -    vmpa2t addr;                            /* Emplacement dans le binaire */      /* Si la taille est nulle, on ne fait rien */      if (method->info.access_flags & ACC_NATIVE)          return; +    if (!g_exe_format_translate_offset_into_vmpa(G_EXE_FORMAT(format), method->offset, &addr)) +        return; +      new = g_binary_portion_new(BPC_CODE);      asprintf(&desc, _("Dalvik code")); @@ -322,7 +326,6 @@ void g_dex_method_include_as_portion(const GDexMethod *method, GPortionLayer *la      free(desc); -    init_vmpa(&addr, method->offset, VMPA_NO_VIRTUAL);      g_binary_portion_set_values(new, &addr, method->body.insns_size * sizeof(uint16_t));      g_binary_portion_set_rights(new, PAC_READ | PAC_EXEC); | 
