mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-25 19:22:07 +00:00
Work around old dwarf producers forgetting mangled names for functions
* src/abg-comparison.cc (corpus_diff::priv::ensure_lookup_tables_populated): If lookup using mangled name for a deleted function yields nada, try the lookup with the pretty representation for the function. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
435f1520d7
commit
7639b2d3ab
@ -5350,6 +5350,18 @@ corpus_diff::priv::ensure_lookup_tables_populated()
|
||||
assert(added_fns_.find(n) == added_fns_.end());
|
||||
string_function_ptr_map::const_iterator j =
|
||||
deleted_fns_.find(n);
|
||||
if (j == deleted_fns_.end())
|
||||
{
|
||||
// It can happen that an old dwarf producer might not
|
||||
// have emitted the mangled name of the first diff
|
||||
// subject. Int hat case, we need to try to use the
|
||||
// function synthetic signature here.
|
||||
// TODO: also query the underlying elf file's .dynsym
|
||||
// symbol table to see if the symbol is present in the
|
||||
// first diff subject before for real.
|
||||
if (!added_fn->get_mangled_name().empty())
|
||||
j = deleted_fns_.find(added_fn->get_pretty_representation());
|
||||
}
|
||||
if (j != deleted_fns_.end())
|
||||
{
|
||||
if (*j->second != *added_fn)
|
||||
|
Loading…
Reference in New Issue
Block a user