summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/v7')
-rw-r--r--src/arch/arm/v7/fetch.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/arch/arm/v7/fetch.c b/src/arch/arm/v7/fetch.c
index 42788af..a1ddd3e 100644
--- a/src/arch/arm/v7/fetch.c
+++ b/src/arch/arm/v7/fetch.c
@@ -369,6 +369,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
VMPA_BUFFER(loc); /* Adresse au format texte */
GPreloadInfo *info; /* Informations préchargées */
GArchInstruction *loaded; /* Instruction de valeur */
+ bool inserted; /* Bilan d'une insertion */
char *desc; /* Description d'accompagnement*/
GDbComment *comment; /* Définition de commentaire */
GArchOperand *new; /* Instruction de ciblage */
@@ -442,41 +443,41 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
info = G_PRELOAD_INFO(context);
- g_preload_info_lock_instructions(info);
+ loaded = g_raw_instruction_new_from_value(&pos, MDS_32_BITS_UNSIGNED, target);
- if (!_g_preload_info_has_instruction_at(info, &loaded_addr))
+ inserted = g_preload_info_add_instruction(info, loaded);
+
+ if (inserted)
{
- loaded = g_raw_instruction_new_from_value(&pos, MDS_32_BITS_UNSIGNED, target);
- _g_preload_info_add_instruction(info, loaded);
- }
+ /* Commentaire associé */
- 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);
- vmpa2_virt_to_string(get_mrange_addr(range), MDS_32_BITS, loc, NULL);
- asprintf(&desc, _("Value used @ %s"), loc);
+ g_preload_info_lock_comments(info);
- g_preload_info_lock_comments(info);
+ comment = _g_preload_info_find_comment_at(info, &loaded_addr);
- 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);
+ }
- 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);
- 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_db_comment_add_dynamic_text(comment, desc);
+ _g_preload_info_add_comment(info, comment);
- _g_preload_info_add_comment(info, comment);
+ }
- }
+ g_preload_info_unlock_comments(info);
- g_preload_info_unlock_comments(info);
+ }
/* Mise à jour de l'affichage et conclusion */