This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] gdb_realpath causes problems with GVD
On Tue, Mar 19, 2002 at 07:16:33PM +0200, Eli Zaretskii wrote:
>
> 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?
Well, that it shouldn't follow file 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?
I believe it will. We'll have a canonical name for each directory a
source file was built out of; if the source file was a link, well, it's
still the name we were given for the source file. Does that seem right
to you?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer