From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10813 invoked by alias); 4 Aug 2010 22:40:12 -0000 Received: (qmail 10794 invoked by uid 22791); 4 Aug 2010 22:40:10 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Aug 2010 22:40:03 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o74Me2mY022319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 4 Aug 2010 18:40:02 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o74MdxVj008359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 4 Aug 2010 18:40:01 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o74MdxN8002723 for ; Thu, 5 Aug 2010 00:39:59 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o74MdxHj002722 for gdb-patches@sourceware.org; Thu, 5 Aug 2010 00:39:59 +0200 Date: Wed, 04 Aug 2010 22:40:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: Re: [rfa] frame address size incorrect if address size != ptr size Message-ID: <20100804223959.GA32106@host1.dyn.jankratochvil.net> References: <20100726145236.GA16155@calimero.vinschen.de> <20100804113501.GU8324@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100804113501.GU8324@calimero.vinschen.de> User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00023.txt.bz2 On Wed, 04 Aug 2010 13:35:01 +0200, Corinna Vinschen wrote: > Ping? This affects generic code in dwarf2-frame.c... > > On Jul 26 16:52, Corinna Vinschen wrote: [...] > /* The target address size. For .eh_frame FDEs this is considered > equal to the size of a target pointer. For .dwarf_frame FDEs, ^^^^^^^^^^^^ = .debug_frame > this is supposed to be the target address size from the associated > CU header. FIXME: We do not have a good way to determine the > latter. Always use the target pointer size for now. */ > cie->addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT; [...] > Therefore I propose the below patch. It continues to compute addr_size > from gdbarch_ptr_bit for .eh_frame sections, but uses gdbarch_addr_bit > in case of .dwarf_frame sections. ^^^^^^^^^^^^ = .debug_frame I find the GDB comment above to be obsolete now. FSF GCC (at least 4.4+ at least x86_64-linux) no longer generates .debug_frame sections (unless you explicitly use -fno-asynchronous-unwind-tables) as generated .eh_frame sections already contains all the needed info. I have not built gcc for the xstrormy16 target to check it more. Still I believe .eh_frame and .dwarf_frame address size should be treated the same. Regards, Jan