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: Brian Ford Cc: cygwin AT cygwin DOT com, , , Subject: Re: Support for DDWARF-2 debug info? (on Cygwin) References: From: Nick Clifton Date: 16 Jan 2003 15:58:09 +0000 In-Reply-To: Message-ID: Lines: 31 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, > My current problem is that all previous DWARF2 implementations > assign a VMA of zero to the .debug_* sections in the link script. > This violates the PE format and makes the executable unusable. I saw your post about this to the binutils list. Does the PE format require that the debugging sections be loaded into memory when the executable is invoked ? The reason that the ELF format allows the .debug sections to have a VMA of zero is that they also do not have the ALLOC flag, so they are not loaded into memory. (A debugger wanting to access the sections for a running process must locate the executable on disk an load them/mmap them from there). > I am still consulting the DWARF2 spec to see if gcc and gas are > correct in generating VMA addresses. If so, I guess I have to fix > the dwarf parsing code in bfd and gdb to subtract the section base > VMA. I do not believe that the DWARF2 spec mandates the VMA addresses of the .debug sections. It does say that their contents must be contiguous, and it does specify the meaning of their contents, but it does not specify the meaning of partially-complete .debug sections. (ie ones attached to relocations that have not yet been resolved). So, I think it is the case that BFD and GDB are both assuming that the VMA of the sections will be zero, but that this is not required. 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/