From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22480 invoked by alias); 1 Jun 2007 17:14:58 -0000 Received: (qmail 22471 invoked by uid 22791); 1 Jun 2007 17:14:58 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Jun 2007 17:14:56 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id DBBCE98219; Fri, 1 Jun 2007 17:14:53 +0000 (GMT) Received: from false.org (nc-76-4-218-255.dyn.embarqhsd.net [76.4.218.255]) by nan.false.org (Postfix) with ESMTP id 8D5E098212; Fri, 1 Jun 2007 17:14:53 +0000 (GMT) Date: Fri, 01 Jun 2007 17:14:00 -0000 From: Daniel Jacobowitz To: Matt Kern Cc: gdb@sourceware.org Subject: Re: DWARF2 FDE Address Mismatch Message-ID: <20070601171454.GA4992@them.org> Mail-Followup-To: Matt Kern , gdb@sourceware.org References: <20070601122049.GA32523@pling.qwghlm.org> <20070601134355.GC2734@them.org> <20070601142613.GA19779@pling.qwghlm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070601142613.GA19779@pling.qwghlm.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00014.txt.bz2 On Fri, Jun 01, 2007 at 03:26:13PM +0100, Matt Kern wrote: > On Fri, Jun 01, 2007 at 09:43:55AM -0400, Daniel Jacobowitz wrote: > > On Fri, Jun 01, 2007 at 01:20:49PM +0100, Matt Kern wrote: > > > ... > > > In short it looks like GDB DWARF2 support lacks a mechanism to override > > > the address size (comparable to DWARF2_ADDR_SIZE in gcc). Is my > > > understanding correct? > > > > Yes, that looks true. Perhaps it should be using TARGET_ADDR_BIT > > instead. > > A quick look at GCC tells me: > > * For EH data it uses a potentially arch-specific macro, > ASM_PREFERRED_EH_DATA_FORMAT() to determine the address siz. This > macro is parameterised by code (data, code label, function ptr) and > global (true if may be affected by dynamic relocs). > > * For non-EH data, DWARF2_ADDR_SIZE is used. For .eh_frame we have to do this funny dance with GCC to determine the "right" behavior. For .debug_frame, there is a standard and we should be following it - and so should GCC. What does it have to say? If it says "the size of an address on the target machine" then we should probably use TARGET_ADDR_BIT; otherwise I'm not sure. I think this format ambiguity has come up before. -- Daniel Jacobowitz CodeSourcery