summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/decomp/const.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/decomp/const.c')
-rw-r--r--src/arch/dalvik/decomp/const.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/arch/dalvik/decomp/const.c b/src/arch/dalvik/decomp/const.c
index 98133ac..a451b55 100644
--- a/src/arch/dalvik/decomp/const.c
+++ b/src/arch/dalvik/decomp/const.c
@@ -47,12 +47,15 @@
GDecInstruction *dalvik_decomp_instr_const(const GArchInstruction *instr, GDecContext *ctx)
{
GDecInstruction *result; /* Instruction à retourner */
+ vmpa_t addr; /* Adresse de l'instruction */
GArchOperand *operand; /* Opérande de l'instruction */
GDecInstruction *reg; /* Pseudo-registre redéfini */
GDecInstruction *imm; /* Valeur immédiate décompilée */
+ g_arch_instruction_get_location(instr, NULL, NULL, &addr);
+
operand = g_arch_instruction_get_operand(instr, 0);
- reg = g_dec_context_convert_register(ctx, operand, true);
+ reg = g_dec_context_convert_register(ctx, operand, true, addr);
operand = g_arch_instruction_get_operand(instr, 1);
imm = g_imm_expression_new(G_IMM_OPERAND(operand));
@@ -80,14 +83,17 @@ GDecInstruction *dalvik_decomp_instr_const(const GArchInstruction *instr, GDecCo
GDecInstruction *dalvik_decomp_instr_const_str(const GArchInstruction *instr, GDecContext *ctx)
{
GDecInstruction *result; /* Instruction à retourner */
+ vmpa_t addr; /* Adresse de l'instruction */
GArchOperand *operand; /* Opérande de l'instruction */
GDecInstruction *reg; /* Pseudo-registre redéfini */
uint32_t index; /* Indice de la chaîne */
const char *value; /* Chaîne de caractères */
GDecInstruction *str; /* Chaîne décompilée */
+ g_arch_instruction_get_location(instr, NULL, NULL, &addr);
+
operand = g_arch_instruction_get_operand(instr, 0);
- reg = g_dec_context_convert_register(ctx, operand, true);
+ reg = g_dec_context_convert_register(ctx, operand, true, addr);
operand = g_arch_instruction_get_operand(instr, 1);
index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand));