This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb follows symlinks when looking for debuginfo
- From: Daniel Jacobowitz <drow at false dot org>
- To: Olaf Hering <olh at suse dot de>
- Cc: gdb at sourceware dot org
- Date: Wed, 23 Jan 2008 12:31:37 -0500
- Subject: Re: gdb follows symlinks when looking for debuginfo
- References: <20080123161537.GA25123@suse.de>
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