From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Berlin To: jtc@redback.com Cc: Christopher Faylor , gdb@sources.redhat.com, binutils@sources.redhat.com Subject: Re: stabs vs. dwarf-2 for C programs Date: Thu, 12 Apr 2001 19:59:00 -0000 Message-id: References: <5mwv8pzgvt.fsf@jtc.redback.com> <20010412221742.A22383@redhat.com> <5mg0fdzg2t.fsf@jtc.redback.com> X-SW-Source: 2001-04/msg00094.html jtc@redback.com (J.T. Conklin) writes: > >>>>> "cgf" == Christopher Faylor writes: > >> In general, are there any advantages for using dwarf-2 over > >> stabs debugging symbols for C (not C++) programs? > >> > >> I did a quick test of rebuilding our system with dwarf-2 debug > >> symbols, and found that the image file grew from 35MB to 167MB > >> and link times nearly quadrupled, so dwarf-2 isn't looking so > >> good so far. If I had to guess, it looks like duplicate debug > >> info (from headers, etc.) isn't being eliminated as is done > >> for stabs. > > cgf> Daniel Berlin contributed some duplicate debug elimination code > cgf> to gcc for Dwarf-2. It should be in the gcc 3.0 branch, if you > cgf> are adventurous. > > Thanks, I'll check that out. > > Assuming that Dan's changes make that a non-issue, are there any other > reasons one might prefer dwarf-2 over stabs for C programs? Like I just posted, they probably won't make it a non-issue for C. The pre-linker pass is on my list of things to do, after all the optimized code debugging support and finishing the work on the new register allocator for gcc. If you are using C, right now, and don't need optimized code debugging, for at least the next 5 or 6 months, i'd stick with STABS. > > --jtc > > -- > J.T. Conklin > RedBack Networks -- The brain is a wonderful organ; it starts working the moment you get up in the morning and doesn't stop until you get to work.