On Mon, Aug 26, 2013 at 10:23:24AM +0200, Jakub Jelinek wrote:
> On Mon, Aug 26, 2013 at 01:42:18PM +0530, Senthil Kumar Selvaraj wrote:
> >   The help text for the --with-dwarf2 configure option says it forces
> >   the default debug format to be DWARF 2. However, the built compiler
> >   still produces DWARF 4, unless -gdwarf-2 is explicitly specified when
> >   compiling.
> 
> This configure option is really --with-dwarf[234], it was added when
> there was dwarf (1) support and dwarf2 support.  In several places
> (including the filename of dwarf2out.c) GCC still talks about dwarf2 when it
> means DWARF2 or later.

Ah ok.
> 
> >   I see that the darwin target gets around this by using the
> >   SUBSUBTARGET_OVERRIDE_OPTIONS hook and setting dwarf_version to 2 if no
> >   specific dwarf version was requested.
> 
> It isn't any kind of workaround the above.  Apple tools are simply so buggy
> that they can't grok DWARF later than 2, crash in lots of ways on it.
> Why do you want DWARF2 rather than DWARF3 or 4?

Same reason, some tools (proprietary debugger etc..) only work with
DWARF2. So I guess the OVERRIDE_OPTIONS hook is the way to go.

Regards
Senthil

Reply via email to