summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/v7/fetch.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/src/arch/arm/v7/fetch.c b/src/arch/arm/v7/fetch.c
index 929c877..42788af 100644
--- a/src/arch/arm/v7/fetch.c
+++ b/src/arch/arm/v7/fetch.c
@@ -367,6 +367,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
uint32_t target; /* Adresse virtuelle visée */
vmpa2t pos; /* Tête de lecture de valeur */
VMPA_BUFFER(loc); /* Adresse au format texte */
+ GPreloadInfo *info; /* Informations préchargées */
GArchInstruction *loaded; /* Instruction de valeur */
char *desc; /* Description d'accompagnement*/
GDbComment *comment; /* Définition de commentaire */
@@ -439,18 +440,43 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
copy_vmpa(&pos, &loaded_addr);
- loaded = g_raw_instruction_new_from_value(&pos, MDS_32_BITS_UNSIGNED, target);
+ info = G_PRELOAD_INFO(context);
- g_preload_info_add_instruction(G_PRELOAD_INFO(context), loaded);
+ g_preload_info_lock_instructions(info);
+
+ if (!_g_preload_info_has_instruction_at(info, &loaded_addr))
+ {
+ loaded = g_raw_instruction_new_from_value(&pos, MDS_32_BITS_UNSIGNED, target);
+ _g_preload_info_add_instruction(info, loaded);
+ }
+
+ g_preload_info_unlock_instructions(info);
vmpa2_virt_to_string(get_mrange_addr(range), MDS_32_BITS, loc, NULL);
asprintf(&desc, _("Value used @ %s"), loc);
- comment = g_db_comment_new_inlined(&loaded_addr, BLF_HAS_CODE, false);
- g_db_comment_add_static_text(comment, desc);
- g_db_item_set_volatile(G_DB_ITEM(comment), true);
+ g_preload_info_lock_comments(info);
+
+ comment = _g_preload_info_find_comment_at(info, &loaded_addr);
+
+ if (comment != NULL)
+ {
+ g_db_comment_add_static_text(comment, "\n");
+ g_db_comment_add_dynamic_text(comment, desc);
+ }
+
+ else
+ {
+ comment = g_db_comment_new_inlined(&loaded_addr, BLF_HAS_CODE, false);
+ g_db_item_set_volatile(G_DB_ITEM(comment), true);
+
+ g_db_comment_add_dynamic_text(comment, desc);
+
+ _g_preload_info_add_comment(info, comment);
+
+ }
- g_preload_info_add_comment(G_PRELOAD_INFO(context), comment);
+ g_preload_info_unlock_comments(info);
/* Mise à jour de l'affichage et conclusion */