This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: debug flags (-feliminate-dwarf2-dups)
scott snyder <snyder@fnal.gov> writes:
> Benjamin Kosnik <bkoz@redhat.com> writes:
> > hey scott. I noticed that you put these flags in your last email:
> >
> > -g -gdwarf-2 -feliminate-dwarf2-dups
> >
> > Seems interesting. I'm wondering if these should be just on by
> > default, by changing DEBUG_FLAGS in the Makefiles.
>
<snip>
>
> (Actually, it was amusing to see that -feliminate-dwarf2-dups significantly
> _increased_ the object file sizes --- there's more overhead since each
> object gets put in its own section.
Why is it amusing? The point of -feliminate-dwarf2-dups was to reduce
the size of debugging executables, not debugging *objects*.
Nothing will reduce that other than using .debug_str or
.debug_loc. Even doing the elimination in the linker obviously won't
reduce the object file size.
> The sizes of the images after linking
> were somewhat smaller, but overall, i think it was pretty much a
> wash.
Then you don't have a lot of common debug info.
It's really helpful if you use a lot of common headers or the STL.
Try compiling 5 files that include, say, map, string, and vector with dwarf2. link
them. Note the executable size. Try it again with
-feliminate-dwarf2-dups.
)
)
>
> sss
--
I used to be a narrator for bad mimes.