This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Adding -file-list-exec-source-file command to GDB/MI
- From: Jason Molenda <jason-swarelist at molenda dot com>
- To: Bob Rossi <bob_rossi at cox dot net>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 21 Mar 2003 01:55:32 -0800
- Subject: Re: Adding -file-list-exec-source-file command to GDB/MI
- References: <20030320224454.GA14096@white>
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.
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?
Jason