Updated to respond to various email comments from Jason, Diego and Cary (issue6197069)

Cary Coutant ccoutant@google.com
Fri Jun 8 22:03:00 GMT 2012


> Hmm, I thought the convention for this sort of flag was to start with -f,
> that -g flags were only for selecting the type and level of debug info.  But
> I see that there are other debug dialect switches that use -g, so I guess
> this is OK.

I kind of prefer -g, but I did notice that it's -fdebug-types-section,
so I could go with -f[no-]pubnames (or, as Jakub suggests,
-f[no-]debug-pubnames-section). On the other hand, there's
-g[no-]record-gcc-switches. What would you prefer?

If we change it, should we also change (in a later patch)
-gsplit-dwarf (orig. -gfission) to -fsplit-dwarf?

>> +  if ((TREE_PUBLIC (decl) && !is_class_die (die->die_parent))
>
> Why not include public class members?  Is the theory that you'll need to
> read the type DIE anyway to do anything with the member, so you might as
> well read it to look up the member in the first place?  There should be a
> comment about this.

Yes, that's the theory. We're just trying to do the same thing that
GDB does when it builds .gdb_index.

>> +  VEC_safe_push (pubname_entry, gc, pubtype_table, &e);
>
> Why add enumerators to pubtypes rather than pubnames?  They seem more like
> variables than types to me.

That looks like a typo. It hasn't caused us any trouble because the
linker just throws all the names into the same table in .gdb_index,
but yes, I think it should go in pubnames_table.

-cary



More information about the Gcc-patches mailing list