delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/16/10:59:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <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: <Pine DOT GSO DOT 4 DOT 44 DOT 0301160902220 DOT 12926-100000 AT eos>
From: Nick Clifton <nickc AT redhat DOT com>
Date: 16 Jan 2003 15:58:09 +0000
In-Reply-To: <Pine.GSO.4.44.0301160902220.12926-100000@eos>
Message-ID: <m3fzrtozn2.fsf@north-pole.nickc.cambridge.redhat.com>
Lines: 31
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019