Re: [RFC] gdb_realpath causes problems with GVD

Joel Brobecker
2002-03-25T18:01:03Z

> I don't understand.

We both agree that the most common case is currently correctly handled
by GDB. The cases I am concerned about are corner-cases, but they did
happen, and I would like GDB to remain consistent: if it tells me about
file bla.C, I expect it to know about bla.C later, even if I don't
provide the path to this file.

> If it doesn't affect the feature I care about, then it doesn't matter
> to me.

Good, because this is exactly what I was suggesting: make GDB consistent
using the new xfullpath function, but at the same time not breaking your
important feature by makin GDB lenient enough to accept the following
syntaxes:
1/ break toto.c:1
2/ break /<fullpath>/toto.c:1
3/ break /<fullpath>/toto.C:1
where fullpath can be resolved but does not need to.

- break toto.C:1 is still not accepted.

> The feature in question is having a way to tell gdb unambiguously
> which file a breakpoint should appear in. The current mechanism for
> this is to use an absolute path.

Well actually, I actually broke this feature if you follow links, that
it is was still working using syntax 2 of the above, so to my defense I
only broke half of this feature :-).

Fortunately, with my latest change, GDB is now printing the "correct"
file name, and all 3 syntaxes are accepted by GDB. You seem OK with
that, but I'd like to have other people's opinion.

BTW: I have the patch ready for submission. I need to work on a new
testcase before I submit it, but the current testsuite already shows one
extra PASS. I need to find a tool to analyze 2 logs that tell me what
has changed...

--
Joel