From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30160 invoked by alias); 3 Jun 2006 01:28:37 -0000 Received: (qmail 30152 invoked by uid 22791); 3 Jun 2006 01:28:36 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 Jun 2006 01:28:33 +0000 Received: from kahikatea.snap.net.nz (p202-124-112-9.snap.net.nz [202.124.112.9]) by viper.snap.net.nz (Postfix) with ESMTP id 9F0437584AB; Sat, 3 Jun 2006 13:28:32 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id A0B4E1D3550; Sat, 3 Jun 2006 13:27:50 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17536.58772.420434.491191@kahikatea.snap.net.nz> Date: Sat, 03 Jun 2006 01:28:00 -0000 To: Susan Macchia Cc: Jim Blandy , gdb@sourceware.org Subject: Re: MI: -file-list-exec-source-files In-Reply-To: <20060603004553.33821.qmail@web51812.mail.yahoo.com> References: <20060603004553.33821.qmail@web51812.mail.yahoo.com> X-Mailer: VM 7.19 under Emacs 22.0.50.19 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/msg00010.txt.bz2 > Perhaps, but in working on the UI for other debuggers, I have seen this and > it looked like the same situation. When I worked on Compaq ladebug, we had > to get the list of source files so that the user could choose one to set > bpts in, or to browse. In retrieving that list from the debugger, I saw e > xactly what Nick is seeing. And in delving into the internals of the > debugger/compiler, I found that the situation I described, with foo.? to > be why I saw more than one source. This is especially true for C++ when > templates are used. What you really want to see in a list like this is > "foo.c compiled this way", "foo.c compiled that way", and so on. I don't > think any debugger has solved this problem reasonably from a UI perspective. I think it's always best to start with the simplest case: mytest.c: main () { myproc (); } myproc.c: myproc () { return 0; } With gcc (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3) cc -g -c myproc.c cc -g -o mytest mytest.c myproc.o With GNU gdb 6.5.50.20060601-cvs, I get: (gdb) -file-list-exec-source-files ^done,files=[{file="myproc.c",fullname="/home/nickrob/myproc.c"},{file="myproc.c",fullname="/home/nickrob/myproc.c"},{file="mytest.c",fullname="/home/nickrob/mytest.c"},{file="mytest.c",fullname="/home/nickrob/mytest.c"}] >From what people have said, I guess a different compiler may give a different result. -- Nick http://www.inet.net.nz/~nickrob