[LIB]: Support DW_AT_MIPS_linkage_name

Another C++ specific case:

-       class TypeTemplate ByName(const string  &, size_t);
+       class TypeTemplate ByName(const string  &, size_t); /* linkage=_ZN4ROOT6Reflex12TypeTemplate6ByNameERKSsj */

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
This commit is contained in:
Arnaldo Carvalho de Melo 2007-07-08 19:47:26 -03:00
parent d6471b435b
commit ce516fb0cf
2 changed files with 10 additions and 0 deletions

View File

@ -1688,6 +1688,7 @@ static struct function *function__new(Dwarf_Die *die)
ftype__init(&self->proto, die);
lexblock__init(&self->lexblock, die);
self->name = strings__add(attr_string(die, DW_AT_name));
self->linkage_name = strings__add(attr_string(die, DW_AT_MIPS_linkage_name));
self->inlined = attr_numeric(die, DW_AT_inline);
self->external = dwarf_hasattr(die, DW_AT_external);
self->abstract_origin = attr_type(die, DW_AT_abstract_origin);
@ -2598,6 +2599,14 @@ size_t tag__fprintf(struct tag *self, const struct cu *cu,
++printed;
}
if (self->tag == DW_TAG_subprogram &&
!pconf->suppress_comments) {
const struct function *fself = tag__function(self);
if (fself->linkage_name != NULL)
printed += fprintf(fp, " /* linkage=%s */", fself->linkage_name);
}
if (pconf->expand_types)
--self->recursivity_level;

View File

@ -316,6 +316,7 @@ struct function {
struct ftype proto;
struct lexblock lexblock;
const char *name;
char *linkage_name;
Dwarf_Off abstract_origin;
Dwarf_Off specification;
size_t cu_total_size_inline_expansions;