This patch makes a lot of changes to the behavior of .debug_pubnames that I haven't seen any discussion of, and that don't seem obvious to me. Can you point me at discussion threads?
http://codereview.appspot.com/6197069/diff/1/gcc/dwarf2out.c File gcc/dwarf2out.c (left): http://codereview.appspot.com/6197069/diff/1/gcc/dwarf2out.c#oldcode22231 gcc/dwarf2out.c:22231: FOR_EACH_VEC_ELT (pubname_entry, pubtype_table, i, p) You don't seem to have added anything to output_pubnames to avoid emitting entries for pruned types. http://codereview.appspot.com/6197069/diff/1/gcc/dwarf2out.c File gcc/dwarf2out.c (right): http://codereview.appspot.com/6197069/diff/1/gcc/dwarf2out.c#newcode8070 gcc/dwarf2out.c:8070: add_AT_lineptr (die, DW_AT_GNU_pubnames, debug_pubnames_section_label); What are these attributes for? Is there a proposal to add them? pubnames/types are used for lookup from a name to a DIE, so there seems to be no reason to have a pointer the other way. http://codereview.appspot.com/6197069/diff/1/gcc/dwarf2out.c#newcode8162 gcc/dwarf2out.c:8162: || is_cu_die (die->die_parent) || is_namespace_die (die->die_parent)) The DWARF standard says that pubnames is for names with global scope; this change would add namespace-scope statics as well. http://codereview.appspot.com/6197069/diff/1/gcc/dwarf2out.c#newcode9177 gcc/dwarf2out.c:9177: add_pubtype (type, base_type_result); Why do we need pubtype entries for base types? http://codereview.appspot.com/6197069/diff/1/gcc/dwarf2out.c#newcode19010 gcc/dwarf2out.c:19010: /* Bypass dwarf2_name's check for DECL_NAMELESS. */ Why bypass the DECL_NAMELESS check? Can you point me at discussion about adding enumerators and namespaces to pubnames? Historically it has just been for things with addresses (the standard says "objects and functions"). http://codereview.appspot.com/6197069/