This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -feliminate-dwarf2-dups not working for C++ ?
- From: Ian Lance Taylor <iant at google dot com>
- To: Ruppert <dieter_ruppert at siemens dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 09 Sep 2010 11:19:00 -0700
- Subject: Re: -feliminate-dwarf2-dups not working for C++ ?
- References: <20100909165018.DFA4955AB@haiti.swb.siemens.de>
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