This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: interesting solib-absolute-prefix problem
On Wed, Dec 03, 2003 at 04:21:06PM -0500, Kris Warkentin wrote:
> It's a bit screwy....you'll probably just have to trust me on it. If it
> makes you feel better, I can give an example of the problem when doing
> remote debugging. Say I'm in my homedir on a cygwin machine. I export a
> CIFS dir /home/kewarken/foo where I build my app. My remote machines
> homedir has foo mounted. So /home/kewarken/foo/libmylib.so is exactly the
> same path on the local and the remote. I've got solib-absolute-prefix set
> to find my system libs but I would hope that gdb would find libmylib.so
> properly because its location is the same on the host and target. As it
> stands, it doesn't.
>
> Would printing something like: "Warning: opening <path_to_lib> without using
> solib-absolute-prefix. You may need to set solib-search-path." make it a
> little better? I could also test for solib_absolute_prefix like so:
>
> + if (solib_absolute_prefix != NULL && found_file < 0 && (found_file =
> open (orig, O_RDONLY, 0)) > -1)
> + temp_pathname = orig;
I've got to agree with Kevin - let's really not go down this path.
> It seems to me that if we accidentally opened up the wrong libc.so, for
> example, we would have some fairly catastrophic failure anyway. You'd have
Yes, we do. Usually, it involves GDB segfaulting. That's why I don't
want us to do this :)
> to have a pretty seriously misconfigured system for that to happen,
> especially since this last ditch check happens after all other search paths
> are used.
For your users, since you autoset solib-absolute-prefix, yes you'd have
to have a pretty seriously misconfigured system. For my users (at
MontaVista), the same thing, since we do something similar for cross
debugging. For the average person who rolls a toolchain themselves,
however, this is an extremely common problem.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer