summaryrefslogtreecommitdiff
path: root/plugins/arm
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-23 21:14:45 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-23 21:14:45 (GMT)
commitbe8f899a0497687c71a650b2e8e4ae1a1bb9caea (patch)
treeae5cc898bb0953fad7c332d92107800e1a344ad0 /plugins/arm
parent79bbaa69ab1c3475bb4775b447da0fda0ca05cd7 (diff)
Warned when trying to load a value which is not addressable.
Diffstat (limited to 'plugins/arm')
-rw-r--r--plugins/arm/v7/fetch.c15
1 files changed, 14 insertions, 1 deletions
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 <i18n.h>
+#include <arch/processor.h>
#include <arch/raw.h>
#include <format/format.h>
#include <format/preload.h>
@@ -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;