From be8f899a0497687c71a650b2e8e4ae1a1bb9caea Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Mon, 23 Apr 2018 23:14:45 +0200 Subject: Warned when trying to load a value which is not addressable. --- plugins/arm/v7/fetch.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/arm/v7/fetch.c b/plugins/arm/v7/fetch.c index 18c5ce3..20918c5 100644 --- a/plugins/arm/v7/fetch.c +++ b/plugins/arm/v7/fetch.c @@ -29,6 +29,7 @@ #include +#include #include #include #include @@ -424,7 +425,19 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst if (!g_exe_format_translate_offset_into_vmpa(format, val_offset, &loaded_addr)) { - assert(0); + /** + * Ce cas de figure correspond à la situation où une instruction "ldr" + * tente de charger une valeur qui se trouve sur un segment qui n'est + * pas chargé en mémoire par exemple. + * + * Dans la pratique, on pourrait parfois retrouver la valeur ciblée, + * mais effectivement cette donnée n'est pas disponible au moment de + * l'exécution. + */ + + g_arch_processor_add_error(proc, APE_DISASSEMBLY, get_mrange_addr(range), + _("Unable to load a value which is not addressable")); + g_object_unref(G_OBJECT(op)); g_arch_instruction_unlock_operands(instr); return; -- cgit v0.11.2-87-g4458