Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin 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 Subject: Re: Support for DDWARF-2 debug info? (on Cygwin) References: From: Nick Clifton Date: 14 Jan 2003 10:02:09 +0000 In-Reply-To: Message-ID: Lines: 22 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/