This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reduce Dwarf Debug Size


On 3/1/07, Joseph S. Myers <joseph@codesourcery.com> wrote:
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?

I have none, but I do have years of experience with C/C++ projects.


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.)

This option is for large applications -- applications where any one person does not have the energy or authority to make such massive code changes. Such changes are particularly problematic when the syntax is not standard because institutions will often simply refuse to adopt the syntax.

I don't want to exclude such a syntax, I just think it is solving a different
problem.

--
Lawrence Crowl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]