This is the mail archive of the
mailing list for the GDB project.
Re: GDB/MI absolute path
- From: Keith Seitz <keiths at redhat dot com>
- To: Bob Rossi <bob_rossi at cox dot net>
- Cc: gdb at sources dot redhat dot com
- Date: 06 Feb 2003 14:17:30 -0800
- Subject: Re: GDB/MI absolute path
- References: <20030206215525.GC7441@white>
On Thu, 2003-02-06 at 13:55, Bob Rossi wrote:
> Also, what is the best way to ask mi for the absolute path to the
> current source file. This wasn't a problem using annotate 1 or 2, and I
> can't figure out how to get it using mi.
This is a known (to me) problem with MI. The problem is that MI was
desinged to work with an IDE, not just a standalone GUI for the
debugger. In the case of an IDE, this information isn't needed, since
the IDE knows everything there is to know about files.
However, like Insight, cgdb will need some way of turning
"../foo/bar/baz.c" into "/home/a/b/c/foo/bar/baz.c". There are two
options (excluding hacks around the problem):
1. Get the complete source search path from GDB and let the GUI search
for the file. This means the GUI writer would also need the compile
directory for each file.
2. Get gdb to tell you where it thinks a file is located.
Of course, I think we'll all agree that #2 is preferred. This is the
route we took in Insight (see
Phew! After saying all that, the real response to your question is:
"It's a bug: open a new bug report." :-(