Re: [RFC] gdb_realpath causes problems with GVD

Eli Zaretskii
2002-03-19T19:18:12Z

> Date: Tue, 19 Mar 2002 12:33:57 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
>
> > 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?

I'm not sure yet. My doubt stems from the fact that directories are
also recorded in the debug info, at least with some formats (stabs,
DWARF2). One place in GDB where we use this is in file-name
completion, for example when you type "break /foo TAB" and want GDB
to complete this to "break /foobar/foo.c" (assuming that there's only
one file foo.c in that directory that was compiled into the program).

Will this break if symlinks are followed in the directory part, but
not in the file-name part?