add_symbol_to_list has this code:
/* If this is an alias for another symbol, don't add it. */
if (symbol->linkage_name () && symbol->linkage_name ()[0] == '#')
return;
This appears to be an old stabs hack. In the stabs removal patch
(commit
eaea19f98d8) we see:
- /* '#' is a GNU C extension to allow one symbol to refer to another
- related symbol.
-
- Generally this is used so that an alias can refer to its main
- symbol. */
This is a classic example of an old style problem that gdb had:
sometimes hacks were added to the gdb core to work around problems in
symbol readers -- IMO this kind of thing should have always been
handled by the stabs reader itself, not add_symbol_to_list.
Anyway, this is obsolete now and this patch removes it.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
void
add_symbol_to_list (symbol *symbol, std::vector<struct symbol *> &list)
{
- /* If this is an alias for another symbol, don't add it. */
- if (symbol->linkage_name () && symbol->linkage_name ()[0] == '#')
- return;
-
list.push_back (symbol);
}