From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8725 invoked by alias); 1 May 2004 04:57:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8717 invoked from network); 1 May 2004 04:57:53 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 1 May 2004 04:57:53 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i414vrKG023737 for ; Sat, 1 May 2004 00:57:53 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i414vov04260; Sat, 1 May 2004 00:57:51 -0400 To: Joel Brobecker Cc: Daniel Jacobowitz , Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [RFC/dwarf-2] Add support for included files References: <20040413052021.GA1173@gnat.com> <20040415221338.GF1564@gnat.com> <20040416230825.GK22414@gnat.com> <20040501011418.GG16083@gnat.com> From: Jim Blandy Date: Sat, 01 May 2004 04:57:00 -0000 In-Reply-To: <20040501011418.GG16083@gnat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-05/txt/msg00008.txt.bz2 Joel Brobecker writes: > > - Is it really okay to pass NULL to dwarf_decode_lines for comp_dir? > > Won't the filenames of the partial symbol tables be different from > > those of the symbol tables? To fix this, read_partial_die would > > have to check for DW_AT_comp_dir attributes, too. > > I don't think we need to worry about the comp_dir when building > the psymtabs for included files. The filename used for the psymtab > is the same as the filename used to build the symtab (checked it > by inspecting start_subfile() and end_symtab()). The only thing > we could gain from computing the comp_dir as well during that phase > is to compute the psymtab fullname. But then comp_dir is used > to set the symtab dirname, not to compute the fullname. So it doesn't > help improve the consistency between psymtab and symtab. Let me make sure I've got it right. When we're calling dwarf_decode_lines for the partial symbol tables, we never call dwarf2_start_subfile anyway --- that's for building full symbol tables --- so the use of 'dirname' in that function doesn't matter. And since it's never used to compute the full name of the symtabs, it doesn't introduce inconsistencies to omit it. If that's correct, then this patch is ready to commit. Thanks very much!