summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/v7/fetch.c')
-rw-r--r--src/arch/arm/v7/fetch.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/arch/arm/v7/fetch.c b/src/arch/arm/v7/fetch.c
index 73cec6d..da83d15 100644
--- a/src/arch/arm/v7/fetch.c
+++ b/src/arch/arm/v7/fetch.c
@@ -353,7 +353,7 @@ void help_fetching_with_instruction_cb_n_z(GArchInstruction *instr, GArchProcess
* proc = représentation de l'architecture utilisée. *
* context = contexte associé à la phase de désassemblage. *
* format = acès aux données du binaire d'origine. *
-* iset = type de jeu d'instructions courant à inverser. *
+* iset = type de jeu d'instructions courant. *
* *
* Description : Complète un désassemblage accompli pour une instruction. *
* *
@@ -429,7 +429,13 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
else
val_offset = phys_pc - offset;
- init_vmpa(&sym_addr, val_offset, VMPA_NO_VIRTUAL);
+ if (!g_exe_format_translate_offset_into_vmpa(G_EXE_FORMAT(format), val_offset, &sym_addr))
+ {
+ assert(0);
+ return;
+ }
+
+ //init_vmpa(&sym_addr, val_offset, VMPA_NO_VIRTUAL);
init_mrange(&sym_range, &sym_addr, 4);
@@ -502,6 +508,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
/// FIXME ?!
if (target < 0x8000) return;
+ if (target > 0x6966c) return;
new = g_imm_operand_new_from_value(MDS_32_BITS_UNSIGNED, target);
@@ -517,7 +524,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
//target = pc + offset;
//g_armv7_context_define_encoding(context, target, AV7IS_THUMB);
- g_armv7_context_push_drop_point_ext(context, target, AV7IS_THUMB);
+ g_armv7_context_push_drop_point_ext(context, target, iset);
//exit(0);