From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14624 invoked by alias); 1 Jun 2007 14:26:36 -0000 Received: (qmail 14615 invoked by uid 22791); 1 Jun 2007 14:26:35 -0000 X-Spam-Check-By: sourceware.org Received: from mx.qwghlm.org (HELO mx.qwghlm.org) (212.69.37.249) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Jun 2007 14:26:30 +0000 Received: from mwk by mx.qwghlm.org with local (Exim 3.36 #1 (Debian)) id 1Hu84z-00070T-00; Fri, 01 Jun 2007 15:26:13 +0100 Date: Fri, 01 Jun 2007 14:26:00 -0000 From: Matt Kern To: Daniel Jacobowitz Cc: gdb@sourceware.org Subject: Re: DWARF2 FDE Address Mismatch Message-ID: <20070601142613.GA19779@pling.qwghlm.org> References: <20070601122049.GA32523@pling.qwghlm.org> <20070601134355.GC2734@them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070601134355.GC2734@them.org> User-Agent: Mutt/1.5.9i 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/msg00011.txt.bz2 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. Given that decode_frame_entry_1() has to work with EH and non-EH data, I would suggest passing eh_frame_p down into read_encoded_value() together with an analogue for "code". If we go on to implement EH, then we will require a target macro that parallels ASM_PREFERRED_EH_DATA_FORMAT(). As far as I can see, this hasn't been an issue until now because most ports either have types that are void* in size or they don't use DWARF2. I can do the work. How do you want to handle the patch though? Do you want me to submit something now, or should I hold it in our port until it matures enough for adoption? Matt -- Matt Kern http://www.undue.org/