From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21317 invoked by alias); 12 Jan 2005 04:18:27 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 21277 invoked from network); 12 Jan 2005 04:18:19 -0000 Received: from unknown (HELO rwcrmhc11.comcast.net) (204.127.198.35) by sourceware.org with SMTP; 12 Jan 2005 04:18:19 -0000 Received: from lucon.org ([24.6.212.230]) by comcast.net (rwcrmhc11) with ESMTP id <2005011204181801300t1cdte>; Wed, 12 Jan 2005 04:18:18 +0000 Received: by lucon.org (Postfix, from userid 1000) id 506CB640F4; Tue, 11 Jan 2005 20:18:18 -0800 (PST) Date: Wed, 12 Jan 2005 04:18:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Subject: Re: PATCH: Support more than 1 comp unit Message-ID: <20050112041818.GA32039@lucon.org> References: <20050112015043.GA30123@lucon.org> <20050112015845.GA17796@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050112015845.GA17796@nevyn.them.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-01/txt/msg00113.txt.bz2 On Tue, Jan 11, 2005 at 08:58:45PM -0500, Daniel Jacobowitz wrote: > On Tue, Jan 11, 2005 at 05:50:43PM -0800, H. J. Lu wrote: > > _bfd_dwarf2_find_nearest_line doesn't support more than one comp unit. > > That's obviously not true. Could you be a little more specific about > what the problem is that you are trying to solve? > dwarf2_debug has /* Preserve the original value of info_ptr for the current comp_unit so we can find a given entry by its reference. */ char* info_ptr_unit; which is used by find_abstract_instance_name: info_ptr = unit->stash->info_ptr_unit + die_ref; The problem is there is only one info_ptr_unit per file for multiple CUs. To work with more than one CU, info_ptr_unit has to be updated for the current CU when find_abstract_instance_name is called. My patch adds the CU offset to comp_unit, which can be used by find_abstract_instance_name to adjust info_ptr_unit. BTW, I have a testcase of a several MB ia64 libc_pic.os generated by "ld -r". H.J.