[RFC] introduction of a new language hook for DWARF2 names
Nicolas Setton
setton@adacore.com
Thu May 11 13:37:00 GMT 2006
Hello,
Right now, DWARF2 variable names are computed using
decl_printable_name (from dwarf2out.c):
-----------------------------------------------------------------------
/* The DWARF2 pubname for a nested thingy looks like "A::f". The
output of lang_hooks.decl_printable_name for C++ looks like
"A::f(int)". Let's drop the argument list, and maybe the scope. */
static const char *
dwarf2_name (tree decl, int scope)
{
return lang_hooks.decl_printable_name (decl, scope ? 1 : 0);
}
-----------------------------------------------------------------------
This is not very convenient for Ada, where the dwarf2 name has to be
different from the printable_name. Also, I imagine other languages
would benefit from the possibility of distinguishing dwarf2 names
from printable names.
Therefore, I'd like to suggest introducing a new language hook, say
decl_dwarf2_name, which would have the same profile as
decl_printable_name, and which would be defined to
decl_printable_name by default.
Do you think I could suggest a patch along those lines?
Thanks a lot for your time,
Nicolas
More information about the Gcc-patches
mailing list