diff options
Diffstat (limited to 'src/arch/dalvik/decomp/invoke.c')
-rw-r--r-- | src/arch/dalvik/decomp/invoke.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/arch/dalvik/decomp/invoke.c b/src/arch/dalvik/decomp/invoke.c index 7337ccc..4b2f20f 100644 --- a/src/arch/dalvik/decomp/invoke.c +++ b/src/arch/dalvik/decomp/invoke.c @@ -62,6 +62,7 @@ GDecInstruction *dalvik_decomp_instr_invoke_direct(const GArchInstruction *instr const char *name; /* Chaîne à afficher */ GDecInstruction *src; /* Source de l'assignation */ GDecInstruction *dest; /* Destination de l'assignat° */ + vmpa_t addr; /* Adresse de l'instruction */ size_t i; /* Boucle de parcours #2 */ GArchOperand *arg; /* Argument brut de l'appel */ GDecInstruction *reg; /* Argument converti */ @@ -123,10 +124,12 @@ GDecInstruction *dalvik_decomp_instr_invoke_direct(const GArchInstruction *instr operand = g_arch_instruction_get_operand(instr, 0); count = g_dalvik_args_count(G_DALVIK_ARGS_OPERAND(operand)); + g_arch_instruction_get_location(instr, NULL, NULL, &addr); + for (i = 1; i < count; i++) { arg = g_dalvik_args_operand_get(G_DALVIK_ARGS_OPERAND(operand), i); - reg = g_dec_context_convert_register(ctx, arg, false); + reg = g_dec_context_convert_register(ctx, arg, false, addr); g_routine_call_add_arg(G_ROUTINE_CALL(result), reg); @@ -158,6 +161,7 @@ GDecInstruction *dalvik_decomp_instr_invoke_static(const GArchInstruction *instr uint32_t index; /* Indice de l'élément visé */ GBinRoutine *routine; /* Routine visée par l'appel */ GDecInstruction *call; /* Représentation de l'appel */ + vmpa_t addr; /* Adresse de l'instruction */ size_t i; /* Boucle de parcours #2 */ GArchOperand *arg; /* Argument brut de l'appel */ GDecInstruction *reg; /* Argument converti */ @@ -181,10 +185,12 @@ GDecInstruction *dalvik_decomp_instr_invoke_static(const GArchInstruction *instr operand = g_arch_instruction_get_operand(instr, 0); count = g_dalvik_args_count(G_DALVIK_ARGS_OPERAND(operand)); + g_arch_instruction_get_location(instr, NULL, NULL, &addr); + for (i = 0; i < count; i++) { arg = g_dalvik_args_operand_get(G_DALVIK_ARGS_OPERAND(operand), i); - reg = g_dec_context_convert_register(ctx, arg, false); + reg = g_dec_context_convert_register(ctx, arg, false, addr); g_routine_call_add_arg(G_ROUTINE_CALL(call), reg); @@ -216,6 +222,7 @@ GDecInstruction *dalvik_decomp_instr_invoke_virtual(const GArchInstruction *inst uint32_t index; /* Indice de l'élément visé */ GBinRoutine *routine; /* Routine visée par l'appel */ GDecInstruction *call; /* Représentation de l'appel */ + vmpa_t addr; /* Adresse de l'instruction */ size_t i; /* Boucle de parcours #2 */ GArchOperand *arg; /* Argument brut de l'appel */ GDecInstruction *reg; /* Argument converti */ @@ -239,10 +246,12 @@ GDecInstruction *dalvik_decomp_instr_invoke_virtual(const GArchInstruction *inst operand = g_arch_instruction_get_operand(instr, 0); count = g_dalvik_args_count(G_DALVIK_ARGS_OPERAND(operand)); + g_arch_instruction_get_location(instr, NULL, NULL, &addr); + for (i = 1; i < count; i++) { arg = g_dalvik_args_operand_get(G_DALVIK_ARGS_OPERAND(operand), i); - reg = g_dec_context_convert_register(ctx, arg, false); + reg = g_dec_context_convert_register(ctx, arg, false, addr); g_routine_call_add_arg(G_ROUTINE_CALL(call), reg); @@ -251,7 +260,7 @@ GDecInstruction *dalvik_decomp_instr_invoke_virtual(const GArchInstruction *inst /* Appel depuis le propriétaire */ arg = g_dalvik_args_operand_get(G_DALVIK_ARGS_OPERAND(operand), 0); - reg = g_dec_context_convert_register(ctx, arg, false); + reg = g_dec_context_convert_register(ctx, arg, false, addr); result = g_access_expression_new(G_DEC_EXPRESSION(reg), G_DEC_EXPRESSION(call)); |