This is the mail archive of the gdb@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: gdb follows symlinks when looking for debuginfo


On Wed, Jan 23, 2008 at 05:15:37PM +0100, Olaf Hering wrote:
> 
> Why does gdb follow symlinks when looking for debuginfo and executables?

Most likely something uses realpath when opening files.  Looks like
exec_file_attach -> openp -> xfullpath.

> The binaries in our installation images are symlinked into a
> loop-mounted cramfs image, or to an extracted tree on a remote
> filesystem.
> The gdb binary itself is a symlink /usr/bin/gdb ->
> /mounts/inst-sys/usr/bin/gdb. For some reason, gdb starts to look for
> debuginfo in /mounts/inst-sys/usr/lib/debug instead of just
> /usr/lib/debug. The same is true for the executable thats being
> debugged.

That path is surprising.  I would have expected
/usr/lib/debug/mounts/inst-sys/...  Does "show sysroot"
show anything?  What about "show debug-file-directory"?

-- 
Daniel Jacobowitz
CodeSourcery


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