This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [patch] support -gdwarf-2 when creating cygwin1.dbg
On Apr 18 08:58, Christopher Faylor wrote:
> On Wed, Apr 18, 2007 at 05:44:25AM -0700, Brian Dessent wrote:
> >The attached patch allows for dllfixdbg to copy DWARF-2 debug sections
> >into the .dbg file. There was also an (accidently?) duplicated section
> >in the cygwin.sc linker script that I removed while I was there.
> >[...]
> Thanks for doing this. Please check in. Can we switch to dwarf-2 by
> default in the cygwin makefile(s)?
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.
There's an explicit
#define DWARF2_UNWIND_INFO 0
in gcc/config/i386/cygming.h right now. The accompanying comment is
/* DWARF2 Unwinding doesn't work with exception handling yet. To make
it work, we need to build a libgcc_s.dll, and dcrt0.o should be
changed to call __register_frame_info/__deregister_frame_info. */
I didn't see any problem with using dwarf2 in Cygwin so far and actually
it lets GDB behave much better than with stabs. I'm not fluent enough
with this low-level stuff so I don't quite understand what this
__register_frame_info/__deregister_frame_info stuff is about.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat