Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 11/30/2011 09:34 PM, Tom Tromey wrote:
"Stephan" == Stephan Bergmann<sbergman@redhat.com>  writes:
Stephan>  Would -ggdb3 excessively increase object size compared to -ggdb2?

The short answer is yes, but there is a more complicated answer.

First, one must consider the tradeoffs.  I always use -g3 when building
gdb, because gdb uses macros fairly heavily, and because I just don't
care about the extra space.  I prefer the convenience.  YMMV of course,
and I don't know enough about LibreOffice to offer an opinion.

I think we need some sensible default for LO here, one that is useful but does not cause problems for the inexperienced (e.g., some of LO's libs already stress the linker quite heavily; would be bad if changing something would turn this from "quite heavily" to "so immensely it starts to break a low-powered system," say).

In a recent-enough GCC (I don't know if it made 4.6, but anyway I think
it is in Fedora 16), there is a GNU extension to how macro information
is represented.  This extension greatly reduces the size of the macro
information.

If you really want to shrink debuginfo, use -gdwarf-4 and
-fdebug-types-section.  The former has been in GCC for a while, I don't
remember when the latter was added.  These options cause debuginfo for
most big types to be shared across compilation units, a huge size win.
This also makes gdb use less memory.

The downside of this feature is that not all tools have been upgraded to
understand it.  gdb works fine, but the 7 dwarves, and systemtap, and I
think valgrind, will barf.  They will all come around eventually, though
I am not sure when.

Ah, good to know.  Things we should investigate.

Thanks,
Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.