From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1441 invoked by alias); 30 Mar 2003 04:06:57 -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 1434 invoked from network); 30 Mar 2003 04:06:55 -0000 Received: from unknown (HELO white) (68.14.146.65) by sources.redhat.com with SMTP; 30 Mar 2003 04:06:55 -0000 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 18zU5s-0002F4-00; Sat, 29 Mar 2003 23:06:52 -0500 Date: Sun, 30 Mar 2003 04:06:00 -0000 From: Bob Rossi To: Andrew Cagney Cc: Jason Molenda , gdb-patches@sources.redhat.com Subject: Re: Adding -file-list-exec-source-file command to GDB/MI Message-ID: <20030330040652.GA8455@white> Mail-Followup-To: Andrew Cagney , Jason Molenda , gdb-patches@sources.redhat.com References: <20030320224454.GA14096@white> <20030321015532.A54903@molenda.com> <20030321131614.GA14884@white> <3E846994.3040708@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E846994.3040708@redhat.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2003-03/txt/msg00587.txt.bz2 On Fri, Mar 28, 2003 at 10:26:12AM -0500, Andrew Cagney wrote: > >On Fri, Mar 21, 2003 at 01:55:32AM -0800, Jason Molenda wrote: > > > >>Hello Bob, > >> > >>My approval isn't needed for these patches or anything, I'm just > >>an interested observer making comments. > >> > >>On Thu, Mar 20, 2003 at 05:44:54PM -0500, Bob Rossi wrote: > >> > > > >>> This change essentially adds the command -file-list-exec-source-file to > >>> the mi commands. > > > >> > >>I don't understand why this command is useful. > >> > >>A UI can get the filename of the currently-executing source file > >>easily enough with "stack-list-frames 0 1". The pathname is returned > >>as it was recorded in the debug info from the compiler - it might > >>be an absolute path or it might be a relative path. > > > > > >At a minumum, it is a strong convienence function for the front end to > >gdb. It guarentees that the front end is thinking about the same file > >that gdb is. The front end needs to know about absolute paths. It cares > >nothing about relative paths. > > > > > >> > >>If the path is relative, gdb will interpret that pathname based on > >>the directory gdb was invoked--which presumably the UI did itself. > >>Or it will be interpreted relative to any paths added with the > >>"dir" (CLI) / "environment-directory" (MI) command, which the UI > >>would have added as well. (or it can get the list of paths with > >>the environment-directory command without any arguments) > >> > >>Why does this information have to be provided by gdb? > > > > > >The best answer probably is, because its been provided for the last > >decade ( with annotation 1 and 2 ). I strongly believe that just because > >gdb is switching its interface to front ends, doesn't mean it should > >take away functionality that was provided before. > > > >However, in my opinion, It doesn't really make sense that each front > >that implements an interface to gdb figure out how to do each of the > >steps provided above. Especially since gdb is already doing all that > >work. > > > >Why repeat the functionality in all of the front ends to gdb? > > > >It would seem that the best solution would be if this command could be > >automatically run ( on the front end's request ) every time the source > >file or line number changed. Just like annotation 1 or 2. > > Sounds like the MI interface should provide both (hey if the client > wants a choice of 14 different salad dressings, then who is gdb to argue). > > Someone want to add an extra field, containing that absolute path, to > the stack-list-frames command? > > Andrew > > Sure, I'll look into that. I would also like to add the extra field to -break-list. Does that make sense to everyone else? Bob Rossi