summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/post.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/v7/post.c')
-rw-r--r--src/arch/arm/v7/post.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/arch/arm/v7/post.c b/src/arch/arm/v7/post.c
index 5ac3c62..6c63832 100644
--- a/src/arch/arm/v7/post.c
+++ b/src/arch/arm/v7/post.c
@@ -56,11 +56,12 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
GBinRoutine *routine; /* Nouvelle routine trouvée */
GBinSymbol *symbol; /* Nouveau symbole construit */
- op = g_arch_instruction_get_operand(instr, 1);
+ g_arch_instruction_lock_operands(instr);
+ op = _g_arch_instruction_get_operand(instr, 1);
- if (!G_IS_IMM_OPERAND(op)) return;
-
+ if (!G_IS_IMM_OPERAND(op))
+ goto ppli_release;
if (g_imm_operand_get_value(G_IMM_OPERAND(op), MDS_32_BITS_UNSIGNED, &addr)
&& g_exe_format_translate_address_into_vmpa(format, addr, &target))
@@ -92,8 +93,12 @@ void post_process_ldr_instructions(GArchInstruction *instr, GArchProcessor *proc
}
- g_arch_instruction_replace_operand(instr, new, op);
+ _g_arch_instruction_replace_operand(instr, new, op);
}
+ ppli_release:
+
+ g_arch_instruction_unlock_operands(instr);
+
}