summaryrefslogtreecommitdiff
path: root/src/analysis/disass/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/disass/output.c')
-rw-r--r--src/analysis/disass/output.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/analysis/disass/output.c b/src/analysis/disass/output.c
index 928ee16..b9b0f1f 100644
--- a/src/analysis/disass/output.c
+++ b/src/analysis/disass/output.c
@@ -83,6 +83,7 @@ void print_disassembled_instructions(GBufferCache *cache, GCodingLanguage *lang,
GLineGenerator *generator; /* Générateur de contenu ajouté*/
const vmpa2t *saddr; /* Adresse de symbole */
int compared; /* Bilan d'une comparaison */
+ char *label; /* Etiquette de symbole */
char *errmsg; /* Description d'une erreur */
SymbolType stype; /* Type de symbole trouvé */
vmpa2t intro_addr; /* Adresse de début de code */
@@ -212,12 +213,16 @@ void print_disassembled_instructions(GBufferCache *cache, GCodingLanguage *lang,
if (compared <= 0)
break;
- log_variadic_message(LMT_BAD_BINARY,
- _("Unable to find a proper location for symbol '%s' @ 0x%08x"),
- g_binary_symbol_get_label(symbol), get_phy_addr(saddr));
+ label = g_binary_symbol_get_label(symbol);
- asprintf(&errmsg, _("Unable to find a proper location for symbol '%s'"),
- g_binary_symbol_get_label(symbol));
+ if (label == NULL)
+ asprintf(&errmsg, _("Unable to find a proper location for symbol"));
+
+ else
+ {
+ asprintf(&errmsg, _("Unable to find a proper location for symbol '%s'"), label);
+ free(label);
+ }
g_arch_processor_add_error(proc, APE_LABEL, saddr, errmsg);