This is the mail archive of the gcc-help@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: -feliminate-dwarf2-dups not working for C++ ?


Ruppert <dieter_ruppert@siemens.com> writes:

> I am trying to reduce the size of debug information for a large C++ project
> and tried -feliminate-dwarf2-dups. This did not work as expected, I got even a
> slight increase in .debug_info (instead of some decrease).

You're right.  -feliminate-dwarf2-dups does not work with C++.  This
seems to be because the C++ frontend does not generate the debug
information for typedefs as it is reading the source files.  It only
generates it after all the sources files have been read, and it does not
associate it with the appropriate header file.  This is probably a bug,
though it may not be an easy one to fix.

Fortunately in mainline gcc, when using -gdwarf=4, there is a better
approach to reducing the size of C++ debug info, which permits much more
duplicate information to be eliminated at link time.  This will be in
gcc 4.6.

Ian


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