This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).
On Thu, 12 Jan 2012 23:26:39 +0100, Paul Pluzhnikov wrote:
> Wouldn't lstat need a configury #ifdef to make it build?
Yes. There exists lstat in gnulib but configury #ifdef would be more
appropriate here I think.
> But there is no need to do realpath on the directory again, so I just pass
> dir2 as canon_dir.
Still you call there:
+ dir1 = xstrdup (objfile->name);
+ canon_dir = lrealpath (dir1);
and later:
+ dir2 = lrealpath (objfile->name);
For all the directory components of objfile->name lrealpath will lstat them by
syscalls twice (for NFS it may get hopefully cached, not sure). There were
some complaints on GDB slowness on NFS.
I do not require this optimization, there are still worse issues on NFS.
Thanks,
Jan