From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16083 invoked by alias); 2 Jun 2006 20:24:31 -0000 Received: (qmail 16074 invoked by uid 22791); 2 Jun 2006 20:24:30 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 02 Jun 2006 20:24:27 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FmGC1-0001M1-9w for gdb@sourceware.org; Fri, 02 Jun 2006 16:24:25 -0400 Date: Fri, 02 Jun 2006 20:24:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: MI: -file-list-exec-source-files Message-ID: <20060602202425.GA5185@nevyn.them.org> Mail-Followup-To: gdb@sourceware.org References: <17535.34396.209512.473501@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17535.34396.209512.473501@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00005.txt.bz2 On Fri, Jun 02, 2006 at 12:29:16PM +1200, Nick Roberts wrote: > The command "-file-list-exec-source-files" often (always?) prints out each > file twice: > > -file-list-exec-source-files > ^done,files=[{file="myprog.c",fullname="/home/nickrob/myprog.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprint.c",fullname="/home/nickrob/myprint.c"},{file="myprog.c",fullname="/home/nickrob/myprog.c"}] > > Looking at the code I had hoped that one cane from the symbol table and the > other from the partial symbol table but in fact, when I try it, they both > come from the partial symbol table. When the program being debugged has lots > of source files (1000's) this is very wasteful, so I would like to make this > command just print out each file once. Before I do I'd like to ask: > > Why does the partial symbol table have duplicate copies? I believe, last time I looked at this, that it has something to do with getting a symbol file from the symbolic dwarf debug information (.debug_info) and another from the main entry in the line table. However, that was a long time ago. You'd have to debug it. > Is it safe to assume that duplicates will occur consecutively? No, since we don't know why they occur ;-) Also, the debug information may actually have multiple entries for one file; GDB doesn't try to rejoin them into a single file. Some compilers do this. -- Daniel Jacobowitz CodeSourcery