From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7396 invoked by alias); 9 Jun 2004 15:42:30 -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 7364 invoked from network); 9 Jun 2004 15:42:27 -0000 Received: from unknown (HELO lakermmtao09.cox.net) (68.230.240.30) by sourceware.org with SMTP; 9 Jun 2004 15:42:27 -0000 Received: from white ([68.9.64.121]) by lakermmtao09.cox.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20040609154227.FHCO24996.lakermmtao09.cox.net@white> for ; Wed, 9 Jun 2004 11:42:27 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1BY5De-00030h-00 for ; Wed, 09 Jun 2004 11:42:26 -0400 Date: Wed, 09 Jun 2004 15:42:00 -0000 From: Bob Rossi To: gdb@sources.redhat.com Subject: dwarf2read.c:read_partial_die question Message-ID: <20040609154226.GC11156@white> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-SW-Source: 2004-06/txt/msg00068.txt.bz2 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? 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. This is what the dwarf2 spec says, A DW_AT_comp_dir attribute whose value is a null-terminated string containing the current working directory of the compilation command that produced this compilation unit in whatever form makes sense for the host system. The suggested form for the value of the DW_AT_comp_dir attribute on UNIX systems is hostname:pathname. If no hostname is available, the suggested form is :pathname. Basically, it doens't say anything about it being NULL. So, what I want to know is, is it valid that the value of part_die->dirname is NULL and that the value of part_die->name is NULL? Thanks, Bob Rossi