Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] gcc debug option

At 08:41 AM 4/5/2010, Pedro Alves wrote:
On Monday 05 April 2010 13:55:18, Ed.Swartz@xxxxxxxxx wrote:
> > > I think it can be safely said that DWARF-2 is significantly better
> > > than STABS as far as the quality and scope of information. Should we
> > > not change the wizard so that -gdwarf-2 is specified instead? Is that
> > > not a better default?
> >
> > If you use a recent GCC, you'll get DWARF-2 automatically.
>
> Well, as John hints, that doesn't work for MinGW.  It has both STABS and DWARF-2 support and defaults to STABS.  And MinGW seems to be the port of choice ATM.

I think that's only true for the old 3.x compilers?  As Dan hints,
it works on MinGW with more recent compilers.  I see
gcc 4.4 based compilers in mingw.org's download section, and I
thought gcc was defaulting to dwarf for a while (a few years).

If you use the latest MinGW installer (5.1.6), you get gcc 3.4.5. The fact that you can get newer (4.x) compilers from the mingw site is great, but think most people will run the installer and use whatever gcc they get. And so I think catering to that more common scenario (i.e., ensuring the best experience for them) has some validity.

IMO, a higher level tool shouldn't be changing the compiler's
default behind the user's back; it should be the decision of the user
to override what the older compiler/toolchain's maintainers decided
was best by default.  I'd have to dig through history, but I assume
gcc 3.4.5 wasn't that much after .secrel32 was added to
binutils, and dwarf2 been made possible on mingw at all.  I'd simply
declare that to support extra features, you should get yourself a
newer toolchain, and avoid all the parsing and mantainance hassle.
FYI, gcc -v won't spit out anything related to specs in not so
ancient gccs.

Just two cents from a bystander.

That's a good point, but if the user of the higher level tool runs into issues that can be resolved by tweaking the toolchain options, then I think it's better for the higher level tool to specify those options in its wizard rather than put some readme note somewhere that this and that won't work properly unless the user manually tweaks the options. We all know how often those sort of notes get read.

I like Ed's idea of dynamically determining whether the tweak is necessary or not.

John

Back to the top