diff options
Diffstat (limited to 'plugins/dalvik')
-rw-r--r-- | plugins/dalvik/operands/pool.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/plugins/dalvik/operands/pool.c b/plugins/dalvik/operands/pool.c index f4fe1fa..d913149 100644 --- a/plugins/dalvik/operands/pool.c +++ b/plugins/dalvik/operands/pool.c @@ -606,12 +606,32 @@ static bool g_dalvik_pool_operand_serialize(const GDalvikPoolOperand *operand, G static bool g_dalvik_pool_operand_get_addr(const GDalvikPoolOperand *operand, const vmpa2t *src, GBinFormat *format, GArchProcessor *proc, vmpa2t *addr) { bool result; /* Bilan à retourner */ + GDexMethod *method; /* Méthode ciblée ici */ + GBinRoutine *routine; /* Routine liée à la méthode */ + const mrange_t *range; /* Zone d'occupation */ result = false; if (operand->type == DPT_METHOD) { - result = false; + method = get_method_from_dex_pool(G_DEX_FORMAT(format), operand->index); + + if (method != NULL) + { + routine = g_dex_method_get_routine(method); + range = g_binary_symbol_get_range(G_BIN_SYMBOL(routine)); + + if (range->addr.physical > 0) + { + copy_vmpa(addr, get_mrange_addr(range)); + result = true; + } + + g_object_unref(G_OBJECT(routine)); + g_object_unref(G_OBJECT(method)); + + } + } return result; |