This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB/MI absolute path

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." :-(


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]