summaryrefslogtreecommitdiff
path: root/plugins/dalvik/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dalvik/context.c')
-rw-r--r--plugins/dalvik/context.c8
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);