This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Support for DDWARF-2 debug info? (on Cygwin)
- From: Nick Clifton <nickc at redhat dot com>
- To: ford at vss dot fsi dot com
- Cc: cygwin at cygwin dot com, binutils at sources dot redhat dot com, dave at beermex dot com, cgf at redhat dot com
- Date: 14 Jan 2003 10:02:09 +0000
- Subject: Re: Support for DDWARF-2 debug info? (on Cygwin)
- References: <Pine.GSO.4.44.0301091216300.12926-100000@eos>
Hi Brian,
> I have built gcc 3.2.1 (just --enable-languages=c so far) with
> "#define DWARF2_DEBUGGING_INFO 1" added to config/i386/cygwin.h.
> The resulting compiler still produces stabs by default, but will
> accept "-gdwarf-2".
>
> When using "-gdwarf-2", the debug information is, I believe,
> correctly output, but the sections have incorrect attributes as
> shown by the "objdump -h" output below.
I believe that this is a gcc problem. GCC generates ".section"
assembler directives to create these sections and it assigns the
attributes for the sections at the same time.
I think that you need to define a "named_section" function for the
gcc_target structure which will then add the necessary flags. For an
example of this see arm_elf_asm_named_section() in
gcc/config/arm/arm.c.
Cheers
Nick