Reduce Dwarf Debug Size

Joseph S. Myers joseph@codesourcery.com
Thu Mar 1 21:35:00 GMT 2007


On Thu, 1 Mar 2007, Lawrence Crowl wrote:

> > And it relies on source naming conventions, which in my humble
> > opinion is a pretty gross thing for GCC to be doing.
> 
> Andrew Pinski <pinskia@gmail.com>
> > It forces a naming convention on people.  Even there are cases where
> > classes are always in the headers and there is no corresponding
> > source file to them.
> 
> I would characterize it as exploiting a naming convention that is
> used by nearly all programmers.  The option doesn't help you if your

Statistical evidence?

Here's a possible alternative to a naming convention: an attribute on a 
class to disable emitting debug info for that class.  The source file that 
forces emission of the debug info for that class would then define a macro 
before including the header, and that macro would cause the attribute not 
to be used by the header.  (You could use a pragma for the whole header 
file instead of an attribute to reduce the size of the changes, but an 
attribute is more flexible.)

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list