diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-06-28 16:59:30 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-06-28 16:59:30 (GMT) |
commit | 398c8a5b054072a6d4ecdd5d2c2df356dddaf53a (patch) | |
tree | f5e6979fcb962f5399902907b14f0cae4404c713 /plugins/dalvik | |
parent | a180a6b30713f38f58a9adc89d775fd142f19629 (diff) |
Replaced all calls to the old API dealing with routine location.
Diffstat (limited to 'plugins/dalvik')
-rw-r--r-- | plugins/dalvik/context.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/dalvik/context.c b/plugins/dalvik/context.c index 752e831..70cbee5 100644 --- a/plugins/dalvik/context.c +++ b/plugins/dalvik/context.c @@ -664,14 +664,16 @@ static void g_dalvik_context_spread_allocated_shared_reg(GDalvikDContext *ctx, G { GDexFormat *format; /* Recherche de méthode */ GBinRoutine *routine; /* Objet des recherches */ + const mrange_t *range; /* Emplacement du symbole */ GDexMethod *method; /* Méthode décompilée */ uint16_t index; /* Identifiant du registre */ DexVariableIndex info; /* Nature du registre */ format = G_DEX_FORMAT(G_DEC_CONTEXT(ctx)->format); routine = G_DEC_CONTEXT(ctx)->routine; + range = g_binary_symbol_get_range(G_BIN_SYMBOL(routine)); - method = g_dex_format_find_method_by_address(format, g_binary_routine_get_address(routine)); + method = g_dex_format_find_method_by_address(format, get_mrange_addr(range)); index = g_dalvik_register_get_index(reg); info = g_dex_method_get_variable(method, index); @@ -703,6 +705,7 @@ static GDecInstruction *g_dalvik_dcontext_convert_register(GDalvikDContext *ctx, GDecInstruction *result; /* Instance à retourner */ GDexFormat *format; /* Recherche de méthode */ GBinRoutine *routine; /* Objet des recherches */ + const mrange_t *range; /* Emplacement du symbole */ GDexMethod *method; /* Méthode décompilée */ const GDalvikRegister *reg; /* Registre Dalvik représenté */ uint16_t index; /* Identifiant du registre */ @@ -712,8 +715,9 @@ static GDecInstruction *g_dalvik_dcontext_convert_register(GDalvikDContext *ctx, format = G_DEX_FORMAT(G_DEC_CONTEXT(ctx)->format); routine = G_DEC_CONTEXT(ctx)->routine; + range = g_binary_symbol_get_range(G_BIN_SYMBOL(routine)); - method = g_dex_format_find_method_by_address(format, g_binary_routine_get_address(routine)); + method = g_dex_format_find_method_by_address(format, get_mrange_addr(range)); reg = g_dalvik_register_operand_get(operand); |