Re: [RFC] gdb_realpath causes problems with GVD

Eli Zaretskii
2002-03-19T17:17:50Z

On Tue, 19 Mar 2002, Joel Brobecker wrote:

> As you see, GDB has translated toto.c into toto.C. This translation
> causes GDB to think that the inferior stopped in a file named toto.C
> (which is not known to GDB, since the compiler used only toto.c).

Are you saying that gdb_realpath shouldn't follow symlinks?

> The translation is performed by gdb_realpath. I searched the gdb-patches
> archives, and found the reason for this translation in a message from
> Tom Tromey. I think I found a way to keep the fix to his problem and
> then at the same time fix our issue: instead of canonicalizing the
> entire filename, I suggest that we only expand the directory prefix
> (ie the part returned by the "dirname" unix command).

Is this a complete solution? That is, will it work in a situation
slightly different from your, e.g., when one of the directories in the
full file name is also a symlink?