[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] gcc debug option
|
> > 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 recommend against having the string "-gdwarf-2" in CDT; at some point, GCC is going to flip to DWARF-3 or DWARF-4 by > default, and it would be a shame for users to lose out on that.
I guess the wizard could do a preflight to be more wizardly... e.g., if you run "gcc -v" you can find:
$ /C/mingw/bin/gcc -v
Reading specs from C:/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
...
and then reading this file, find:
*asm_debug:
%{gdwarf-2*:--gdwarf2}%{!gdwarf-2*:%{g*:--gstabs}}
And deduce that the default is stabs (and/or search for "gdwarf.*" and pick that...)
-- Ed