From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19849 invoked by alias); 28 Mar 2003 14:33:41 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19839 invoked from network); 28 Mar 2003 14:33:40 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 28 Mar 2003 14:33:40 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18ywos-0004dZ-00; Fri, 28 Mar 2003 10:35:06 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18yuvG-0001GK-00; Fri, 28 Mar 2003 09:33:34 -0500 Date: Fri, 28 Mar 2003 14:33:00 -0000 From: Daniel Jacobowitz To: Stanley Gambarin Cc: gdb@sources.redhat.com Subject: Re: dwarf2 & DW_FORM_ref_addr Message-ID: <20030328143333.GA4837@nevyn.them.org> Mail-Followup-To: Stanley Gambarin , gdb@sources.redhat.com References: <20030328032124.20167.qmail@web14202.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030328032124.20167.qmail@web14202.mail.yahoo.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00385.txt.bz2 On Thu, Mar 27, 2003 at 07:21:24PM -0800, Stanley Gambarin wrote: > Hello, > i'm working with the compiler that makes use > of DW_FORM_ref_addr to generate 'type' attributes > (DW_AT_type) that span multiple dwarf2 compilation > units within a single source file (multiple > compilation units are produced for template > functions and are eliminated by linker via > .gnu.linkonce sections). When trying to debug > executable with GDB, i get the following message: > > Dwarf Error: Cannot find referent at offset 3716. > > Digging into it a bit further, I find that dies > are stored in the die_ref_table (hash) for each > dwarf2 compilation unit. At the beginning of > read_comp_unit() there is a call to clear the > hash table, so that later lookup for my type > in die_type() function will fail !!! According to > dwarf2 spec (page 69 of 2.0.0 revision): > ... > The second type of reference is the address of any > debugging information entry within the same executable > or shared object; it may refer to an entry in a > different compilation unit from the unit containing > the reference. This type of reference > (DW_FORM_ref_addr) ... > > I guess that GCC is not generating it, but I wonder > if GDB should support it ? It should support it and doesn't currently. It's come up a couple times if you search the list archives. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer