From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25522 invoked by alias); 29 Nov 2004 02:11:53 -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 24899 invoked from network); 29 Nov 2004 02:11:48 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 29 Nov 2004 02:11:48 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iAT2Bmex010734 for ; Sun, 28 Nov 2004 21:11:48 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iAT2Blr11288 for ; Sun, 28 Nov 2004 21:11:47 -0500 Received: from localhost.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id iAT2BlQB010350; Sun, 28 Nov 2004 21:11:47 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id D50161A467A; Sun, 28 Nov 2004 21:07:47 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16810.33907.717155.200928@localhost.redhat.com> Date: Mon, 29 Nov 2004 02:11:00 -0000 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/dwarf2] Fix name of include psymtabs, avoid duplicates In-Reply-To: <20041101194801.GI27334@gnat.com> References: <20041017010238.GD20779@gnat.com> <20041101194801.GI27334@gnat.com> X-SW-Source: 2004-11/txt/msg00500.txt.bz2 Joel Brobecker writes: > > % gcc -gdwarf-2 -o main foo/main.c > > > > When GDB scans the dwarf2 data to create the psymtabs, it scans > > the linetable for each CU and create "include psymtabs" for it. > > These psymtabs correspond to the files included from that CU > > (see call to dwarf2_build_include_psymtabs at the end of > > dwarf2_build_psymtabs_hard). > > > > Unfortunately, a little omission in my part lead to a bug: > > > > (gdb) file main > > (gdb) info sources > > [...] > > Source files for which symbols will be read in on demand: > > [...], main.c, /home/brobecke/tmp/dup/foo/main.c, [...] This seems easy to add to the testsuite. Just create a subdirectory in gdb.dwarf2, and issue the above commands. > > 2004-10-16 Joel Brobecker > > > > * dwarf2read.c (dwarf_decode_lines): Use the complete filename > > when creating include psymtabs. > > > > Tested on x86-linux, no regression. > > OK to apply? Yes, after you add the test, which should fail before and pass after your patch.