From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12199 invoked by alias); 9 Jun 2004 15:45:46 -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 12190 invoked from network); 9 Jun 2004 15:45:44 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 9 Jun 2004 15:45:44 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BY5Gq-0007EN-68 for ; Wed, 09 Jun 2004 11:45:44 -0400 Date: Wed, 09 Jun 2004 15:45:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: dwarf2read.c:read_partial_die question Message-ID: <20040609154544.GA27720@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <20040609154226.GC11156@white> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040609154226.GC11156@white> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00070.txt.bz2 On Wed, Jun 09, 2004 at 11:42:26AM -0400, Bob Rossi wrote: > Hi, > > I modified read_partial_die with my -file-list-exec-source-files patch. > > I have this, > 4875 case DW_AT_name: > 4876 > 4877 /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */ > 4878 if (part_die->name == NULL) > 4879 part_die->name = DW_STRING (&attr); > 4880 break; > 4881 case DW_AT_comp_dir: > 4882 if (part_die->dirname == NULL) > 4883 part_die->dirname = DW_STRING (&attr); > 4884 break; > > So, the question is, part_die->name is NULL and part_die->dirname is > NULL. Is this OK? Why would the name or the dirname of the file be NULL? Trivial answer: Because the compiler did not emit DW_AT_comp_dir or DW_AT_name for the compilation unit. > This is the comment in the testcase (twice.exp) that is producing this > behavior > # Test that GDB can still detect whether we have line numbers > # even if we're executing code in an include file. Check what GCC is emiting (readelf -wi); do you have a compilation unit missing these attributes, or have we lost track of them somehow? -- Daniel Jacobowitz