[patch] support -gdwarf-2 when creating cygwin1.dbg

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Wed Apr 18 13:23:00 GMT 2007

On Wed, Apr 18, 2007 at 06:17:59AM -0700, Brian Dessent wrote:
>Christopher Faylor wrote:
>> Thanks for doing this.  Please check in.  Can we switch to dwarf-2 by
>> default in the cygwin makefile(s)?
>I thought about that, but the problem is anything you do to *FLAGS in
>winsup/cygwin won't affect flags used in the other dirs like libiberty
>or newlib, and so unless you set CXXFLAGS and CFLAGS when you do
>toplevel configure, you'll end up with a mish-mash of some stabs and
>some DW2 in the .dbg file.

So, maybe a top-level configure option would be useful?  At the very least
we can get rid of the -gstabs specific use in configure.

>Corinna Vinschen wrote:
>> As long as we use a 3.x or 4.0.x gcc it should be ok.  Later gcc's
>> explicitely switch off the generation of a DW_CFA_offset column in the
>> .debug_frame CIE header information, which breaks backtracing in GDB.
>Hmm, I think I read something about that on the gcc list.  Is this just
>a case of gcc switching to doing TheActualRightThing and gdb not having
>being updated yet?
>> There's an explicit
>> #define DWARF2_UNWIND_INFO 0
>> in gcc/config/i386/cygming.h right now.  The accompanying comment is
>Aren't we talking about two different things here?  That's for unwinding
>during exception handling, but you can still leave that at 0 (and use
>--enable-sjlj-exceptions) and still get the benefit of -gdwarf-2 for
>gdb's consumption.

IIRC, this is turned on because of funkiness with exception unwinding in


More information about the Cygwin-patches mailing list