This is the mail archive of the gdb-patches@sourceware.org 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: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).


On Thu, Jan 12, 2012 at 2:40 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:

> There exists lstat in gnulib

There doesn't appear to be one in my (freshly sync'd) copy:

grep -r lstat gnulib
gnulib/Makefile.in:localstatedir = @localstatedir@

> Still you call there:
> + ?dir1 = xstrdup (objfile->name);
> + ?canon_dir = lrealpath (dir1);
> and later:
> + ?dir2 = lrealpath (objfile->name);

If objfile->name is "/foo/bar/baz", and is a symlink to "/zork/zark/baz"
(and nothing else is a symlink) then the two realpath() calls will return
"/foo/bar" and "/zork/zark/baz" and (I think) are unavoidable.

Thanks,
-- 
Paul Pluzhnikov


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