From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 416 invoked by alias); 30 Sep 2008 17:05:49 -0000 Received: (qmail 407 invoked by uid 22791); 30 Sep 2008 17:05:48 -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; Tue, 30 Sep 2008 17:05:08 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2079810D2F; Tue, 30 Sep 2008 17:05:06 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 08AA110199; Tue, 30 Sep 2008 17:05:05 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Kkien-0006wk-4s; Tue, 30 Sep 2008 13:05:05 -0400 Date: Tue, 30 Sep 2008 17:05:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA/DWARF2] Handle nested subprograms in CU pc bound calculation Message-ID: <20080930170504.GA26684@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20080930152757.GC23135@adacore.com> <20080930154235.GA13221@caradoc.them.org> <20080930165557.GG3811@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080930165557.GG3811@adacore.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-09/txt/msg00579.txt.bz2 On Tue, Sep 30, 2008 at 09:55:57AM -0700, Joel Brobecker wrote: > > > 1. When compiling with -ffunction-sections, the compiler is not > > > providing the CU PC bounds (DW_AT_low_pc and DW_AT_high_pc). > > > I would imagine that this is because functions might be removed > > > later during the link, and thus bounds might be affected. > > > > It should provide DW_AT_ranges instead. Is it not doing that? What > > era compiler is this? > > The compiler is based on GCC 4.1. I don't really know what GCC 4.3 does. > How would the range help with -ffunction-section, though? Does the > linker known how to remove one of the ranges when he discards an > unused function? It'd be reduced to an empty range, or at least moved to zero. As long as that isn't the list terminator it'd work OK. If it is, some linker smarts may be needed... -- Daniel Jacobowitz CodeSourcery