This is the mail archive of the gdb@sources.redhat.com 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: Why does solib_open do what it does?


On Jun 19,  4:16pm, Kevin Buettner wrote:

> It's still not clear to me if the PATH and LD_LIBRARY_PATH searches
> are needed for natives.  Either they're not needed or nobody's noticed
> that some previously available functionality (prior to Nov 21, 2000)
> is now missing.  I do know, however, that we definitely don't want to
> do these searches for (most) remote targets.  In light of Michael's
> remarks, I'm now inclined to be more cautious about removing these
> searches than I was originally.
> 
> Further, if you're debugging a remote target, you'd better have
> solib-absolute-prefix set, or things will almost certainly go wrong. 
> To the best of my knowledge, when you're debugging a native target,
> you never set solib-absolute-prefix, so the fact that this is set or
> not gives us a cheap, but effective way to determine whether the
> intent is to run on a native target or not.
> 
> Actually, it's better than that.  Something that I occassionally do is
> to run against a "native" rda or gdb server where I don't set
> solib-absolute-prefix.  Doing things in this fashion will make search
> algorithm for this kind of "remote" (which is really a native
> disguised as a remote) target identical to running a native and that
> is precisely what's desired.

I've just thought of another way to look at this which has nothing to
do with inferences about which settings imply remote targets vs. 
which imply native targets.

When you set solib-absolute-prefix, you want all absolute paths (aside
from those constructed from solib-search-path) to be searched for
using the given prefix.  Our present search code using PATH and
LD_LIBRARY_PATH does not honor solib-absolute-prefix for absolute
paths, so it makes (some) sense to disable these searches when
solib-absolute-prefix is set.

It would probably make more sense to force the PATH and LD_LIBRARY_PATH
searches to honor solib-absolute-prefix, but before we go down that
road, I'd like to reach some definite conclusion regarding whether
these searches are really necessary.

Kevin


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