This is the mail archive of the gcc@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: DWARF2 [was Re: IA32 bootstrap error]




On Mon, 31 Dec 2001, Bryce McKinlay wrote:

> Daniel Berlin wrote:
>
> >There are in fact, other things in dwarf2 we can't emit right now because
> >gdb doesn't support them.  Location lists come to mind. As do inter-CU
> >references.  There are plenty of other caveats. C++ debugging, is
> >completely dependent on the fact that we emit a DW_AT_MIPS_linkage_name
> >attribute that is non-standard. GDB falls down a lot without it (though
> >it's being fixed).
> >
>
> My concern about dwarf2 being the default is the large amount of bloat
> that it seems to add. For example, a libgcj.so which was around 10MB
> with stabs is now over 20MB with dwarf2 (and even bigger when not using
> the latest binutils). The debugging info is twice as large as the code!
> For a static library the situtation is even worse.

This is one reason jakub added .debug_str support. It will help.

>
> Its nice to distribute a debuggable libgcj, but the size overhead is
> beginnning to make it impractical in some case. Perhaps there are
> missing features in GDB which would allow GCC to produce smaller output?
Yes, we can't eliminate duplicates without a *lot* of pain because gdb
doesn't support inter-cu references, so we can't just refer to DIEs in
other CU's when we know they are already there.

Doing this, plus removing DW_AT_MIPS_linkage_name, should remove basically
all the remaining bloat you see (the debug_str patch should remove quite a
bit, actually, b).  A large portion of the string table is taken up by
mangled names sitting in DW_AT_MIPS_linkage_name attributes.

DWARF2 is a much denser format than stabs.  If we could even use basic
features (which, in reality, is what an inter-CU reference is) without it
breaking GDB so horrendously, with no fix in sight, we could make
the debug info take up a lot less space.

The sad thing is that, as i said, other things that implement dwarf2
reading (IE other debuggers, things that use libdwarf), etc, all handle
these features just fine. It's not like we are talking advanced or
complicated to understand/implement things.

 --Dan


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