summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-01-06 04:12:24 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-01-06 04:12:24 (GMT)
commit6db53b26e6c3d973295df51bb1934d5b42fb6ebe (patch)
tree401358c8b10a879daa23336d06d7f14f273ee764 /src/arch/arm
parent73308548c2be7f6480f3c898ceb6d01ae4e3f64c (diff)
Checked if a symbol exists right before adding it to the symbol list.
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/v7/fetch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/arm/v7/fetch.c b/src/arch/arm/v7/fetch.c
index c0004b4..15707e3 100644
--- a/src/arch/arm/v7/fetch.c
+++ b/src/arch/arm/v7/fetch.c
@@ -363,6 +363,7 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
GArchInstruction *sym_instr; /* Instruction de symbole */
GBinSymbol *symbol; /* Nouveau symbole construit */
GDbComment *comment; /* Définition de commentaire */
+ bool added; /* Bilan de l'insertion */
GArchOperand *new; /* Instruction de ciblage */
/* Récupération de l'adresse visée par le chargement */
@@ -439,13 +440,14 @@ void help_fetching_with_instruction_ldr_literal_with_orig(GArchInstruction *inst
vmpa2_virt_to_string(get_mrange_addr(range), MDS_32_BITS, loc, NULL);
snprintf(name, name_len, _("Value used @ %s"), loc);
- ADD_RAW_AS_SYM(G_BIN_FORMAT(format), symbol, sym_instr, comment, name);
+ added = ADD_RAW_AS_SYM(G_BIN_FORMAT(format), symbol, sym_instr, comment, name);
free(name);
- g_proc_context_push_new_symbol_at(G_PROC_CONTEXT(context), &sym_addr);
+ if (added)
+ g_proc_context_push_new_symbol_at(G_PROC_CONTEXT(context), &sym_addr);