gdb follows symlinks when looking for debuginfo

Daniel Jacobowitz drow@false.org
Wed Jan 23 18:16:00 GMT 2008


On Wed, Jan 23, 2008 at 07:04:28PM +0100, Olaf Hering wrote:
> For 3 yast libs (the first 3 libs to load), the path is wrong.

Are these the only ones symlinked?  I bet this:

> 2953  open("/usr/lib/YaST2/plugin/libpy2wfm.so.2", O_RDONLY) = 7

is a symlink to /mounts/instsys, and this:

> 2953  open("/lib/libexpat.so.1", O_RDONLY) = 3

is not.

I don't know what to suggest.  The real location of the file, on an
installed system, is probably relative to where the real debug info
will be found.

You can work around this with a couple of creative symlinks.  For
instance:

> 2953  open("/mounts/instsys/usr/lib/YaST2/plugin/libpy2wfm.so.2.0.0.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
> 2953  open("/mounts/instsys/usr/lib/YaST2/plugin/.debug/libpy2wfm.so.2.0.0.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
> 2953  open("/mounts/instsys/usr/lib/debug//mounts/instsys/usr/lib/YaST2/plugin/libpy2wfm.so.2.0.0.debug", O_RDONLY) = -1 ENOENT (No such file or directory)

The third path is wrong for you, but you can make the second path
right.  Symlink /mounts/instsys/usr/lib/YaST2/plugin/.debug to
/mounts/instsys/usr/lib/debug/usr/lib/YaST2/plugin.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list