diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-12-13 11:40:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-12-13 11:40:53 (GMT) |
commit | 73d58a38c5847f54aa9458b3612ffd35b7372dc9 (patch) | |
tree | b1412630f4679cdf5c9e97943f0fb9645a426592 /src/format/symbol.c | |
parent | 3754a5e3edeea98ce426b65772708ae91b291c1f (diff) |
Ensured all symbol comments match their symbol address.
Diffstat (limited to 'src/format/symbol.c')
-rw-r--r-- | src/format/symbol.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c index fb198d9..48f3dbb 100644 --- a/src/format/symbol.c +++ b/src/format/symbol.c @@ -598,6 +598,20 @@ GArchInstruction *g_binary_symbol_get_instruction(const GBinSymbol *symbol) void g_binary_symbol_set_comment(GBinSymbol *symbol, GDbComment *comment) { +#ifndef NDEBUG + const vmpa2t *saddr; /* Adresse du symbole */ + const vmpa2t *caddr; /* Adresse du commentaire */ +#endif + +#ifndef NDEBUG + + saddr = get_mrange_addr(g_binary_symbol_get_range(symbol)); + caddr = g_db_comment_get_address(comment); + + assert(cmp_vmpa(saddr, caddr) == 0); + +#endif + symbol->comment = comment; } |