From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28512 invoked by alias); 28 Mar 2003 03:21:25 -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 28504 invoked from network); 28 Mar 2003 03:21:24 -0000 Received: from unknown (HELO web14202.mail.yahoo.com) (216.136.172.144) by sources.redhat.com with SMTP; 28 Mar 2003 03:21:24 -0000 Message-ID: <20030328032124.20167.qmail@web14202.mail.yahoo.com> Received: from [65.84.10.210] by web14202.mail.yahoo.com via HTTP; Thu, 27 Mar 2003 19:21:24 PST Date: Fri, 28 Mar 2003 03:21:00 -0000 From: Stanley Gambarin Subject: dwarf2 & DW_FORM_ref_addr To: gdb@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-03/txt/msg00382.txt.bz2 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 ? -- stanley __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com