From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27883 invoked by alias); 1 Jun 2007 14:55:48 -0000 Received: (qmail 27874 invoked by uid 22791); 1 Jun 2007 14:55:48 -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:55:45 +0000 Received: from mwk by mx.qwghlm.org with local (Exim 3.36 #1 (Debian)) id 1Hu8XR-0000A2-00; Fri, 01 Jun 2007 15:55:37 +0100 Date: Fri, 01 Jun 2007 14:55:00 -0000 From: Matt Kern To: Daniel Jacobowitz Cc: gdb@sourceware.org Subject: Re: DWARF2 FDE Address Mismatch Message-ID: <20070601145537.GA32367@pling.qwghlm.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.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/msg00012.txt.bz2 Scratch that. We should probably do what GCC does and call either read_encoded_value() or another read function depending upon eh_frame_p. Matt 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. > > 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/ -- Matt Kern http://www.undue.org/