From: "Kris Warkentin" <kewarken@qnx.com>
To: "Kevin Buettner" <kevinb@redhat.com>,
"Michael Snyder" <msnyder@redhat.com>
Cc: "Daniel Jacobowitz" <drow@mvista.com>,
"Gdb@Sources.Redhat.Com" <gdb@sources.redhat.com>
Subject: Re: Why does solib_open do what it does?
Date: Wed, 18 Jun 2003 12:11:00 -0000 [thread overview]
Message-ID: <003301c33594$3e6bccf0$2a00a8c0@dash> (raw)
In-Reply-To: <1030618051511.ZM11645@localhost.localdomain>
> Given the fact that these tests are here, I don't think that the $PATH
> and $LD_LIBRARY_PATH checks are ever actually used for native
> debugging.
>
> After all, who bothers to set solib_search_path when doing native
> debugging? And if you do set solib_search_path, doesn't it seem
> strange that these additional checks suddenly become enabled?
Hmm...good point. It's probably completely unexercised code.
> So, at this point we have two choices: a) Do away with the $PATH and
> $LD_LIBRARY_PATH code altogether, or b) Do as you suggest and remove
> the ``solib_search_path != NULL'' check.
>
> If we can actually convince ourselves that leaving in the $PATH and
> $LD_LIBRARY_PATH checks serve a useful purpose, option b is the way to
> go. At the moment, however, I'm strongly leaning towards option a.
Well, we had some customers complain that LD_LIBRARY_PATH stopped working
for them when they stopped setting solib-search-path. They were using it
for remote debugging (somewhat questionable I know) because they have a
central build server that stores most of their libs and then developers
systems have a mount. The administrators set LD_LIBRARY_PATH specifically
for gdb to find these libs when debugging remote targets.
They'll probably whine if I take it out. Really though, the only places I
can see this being useful is cases like this and when you've got a
misbehaving linker which doesn't fill in the full path.
> In fact, for remote debugging, leaving these checks in is rather
> dangerous. If, for some reason, the shared lib is not found via
> either solib-absolute-prefix or solib-search-path, we don't want
> to search paths on the host file system which refer to the hosts
> libraries. If the file is found via one of these paths, it is
> almost certainly wrong, and I've seen cases where this can cause
> wildly unpredictable behavior. (E.g, segfaults on the target, or
> breakpoints being hit at strange places.)
This was my major problem with checking LD_LIBRARY_PATH.
> I think I could be convinced to leave these checks in if we
> were to replace that ``solib_search_path != NULL'' conjunct with
> ``solib_absolute_prefix == NULL'' instead. That is, if you set
> solib_absolute_prefix, then $PATH and $LD_LIBRARY_PATH will never
> be considered. (I guess there were actually three choices. We'll
> call this one option c.)
Well, that wouldn't help my customers since we do set solib-absolute-prefix.
On the other hand, there IS solib-search-path and .gdbinit files so I don't
really have a problem with telling them that the LD_L... checking has gone
away. I'll leave the decision to you. I'm just going to remove the
solib_search_path != NULL checks from our shipping version and mark the
behaviour as deprecated if necessary.
cheers,
Kris
next prev parent reply other threads:[~2003-06-18 12:11 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-17 19:01 Kris Warkentin
2003-06-17 19:13 ` Daniel Jacobowitz
2003-06-17 19:14 ` Kris Warkentin
2003-06-17 19:37 ` Elena Zannoni
2003-06-17 19:47 ` Kris Warkentin
2003-06-17 20:01 ` Kevin Buettner
2003-06-17 20:15 ` Kris Warkentin
2003-06-17 20:24 ` Kevin Buettner
2003-06-18 0:14 ` Michael Snyder
2003-06-18 1:43 ` Kris Warkentin
2003-06-18 5:33 ` Kevin Buettner
2003-06-18 12:11 ` Kris Warkentin [this message]
2003-06-18 15:07 ` Kris Warkentin
2003-06-18 18:52 ` Michael Snyder
2003-06-18 19:09 ` Kris Warkentin
2003-06-18 19:20 ` Andrew Cagney
2003-06-18 20:10 ` Michael Snyder
2003-06-18 20:17 ` Kris Warkentin
2003-06-18 19:14 ` Daniel Jacobowitz
2003-06-18 18:45 ` Michael Snyder
2003-06-18 18:41 ` Michael Snyder
2003-06-18 19:16 ` Daniel Jacobowitz
2003-06-18 20:11 ` Michael Snyder
2003-06-18 20:19 ` Kris Warkentin
2003-06-18 20:27 ` Daniel Jacobowitz
2003-06-18 20:51 ` Michael Snyder
2003-06-19 12:24 ` Kris Warkentin
2003-06-19 23:33 ` Kevin Buettner
2003-06-20 0:02 ` Kevin Buettner
2003-06-20 12:28 ` Kris Warkentin
2003-06-20 12:43 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003301c33594$3e6bccf0$2a00a8c0@dash' \
--to=kewarken@qnx.com \
--cc=drow@mvista.com \
--cc=gdb@sources.redhat.com \
--cc=kevinb@redhat.com \
--cc=msnyder@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox