From: kewarken <kewarken@qnx.com>
To: gdb-patches@sources.redhat.com
Subject: [Patch] modify search order in solib.c:solib_open
Date: Fri, 20 Jun 2003 12:26:00 -0000 [thread overview]
Message-ID: <Pine.CYG.4.55.0306200820260.3296@catdog.ott.qnx.com> (raw)
Okay. Here's my patch, this time using pine so my indentation won't get
buggered. Applied.
cheers,
Kris
2003-06-19 Kris Warkentin <kewarken@qnx.com>
* solib.c (solib_open): Change tests for whether to search
LD_LIBRARY_PATH and PATH to better deal with remotes. Update
comments.
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.57
diff -c -p -r1.57 solib.c
*** solib.c 11 Jun 2003 13:16:29 -0000 1.57
--- solib.c 20 Jun 2003 12:16:50 -0000
*************** static char *solib_search_path = NULL;
*** 87,99 ****
(or set of directories, as in LD_LIBRARY_PATH) to search for all
shared libraries if not found in SOLIB_ABSOLUTE_PREFIX.
! Search order:
! * If path is absolute, look in SOLIB_ABSOLUTE_PREFIX.
! * If path is absolute or relative, look for it literally
(unmodified).
* Look in SOLIB_SEARCH_PATH.
* If available, use target defined search function.
! * Look in inferior's $PATH.
! * Look in inferior's $LD_LIBRARY_PATH.
RETURNS
--- 87,105 ----
(or set of directories, as in LD_LIBRARY_PATH) to search for all
shared libraries if not found in SOLIB_ABSOLUTE_PREFIX.
! Search algorithm:
! * If there is a solib_absolute_prefix and path is absolute:
! * Search for solib_absolute_prefix/path.
! * else
! * Look for it literally (unmodified).
* Look in SOLIB_SEARCH_PATH.
* If available, use target defined search function.
! * If solib_absolute_prefix is NOT set, perform the following two
searches:
! * Look in inferior's $PATH.
! * Look in inferior's $LD_LIBRARY_PATH.
! *
! * The last check avoids doing this search when targetting remote
! * machines since solib_absolute_prefix will almost always be set.
RETURNS
*************** solib_open (char *in_pathname, char **fo
*** 148,154 ****
in_pathname++;
}
! /* If not found, next search the solib_search_path (if any). */
if (found_file < 0 && solib_search_path != NULL)
found_file = openp (solib_search_path,
1, in_pathname, O_RDONLY, 0, &temp_pathname);
--- 154,160 ----
in_pathname++;
}
! /* If not found, search the solib_search_path (if any). */
if (found_file < 0 && solib_search_path != NULL)
found_file = openp (solib_search_path,
1, in_pathname, O_RDONLY, 0, &temp_pathname);
*************** solib_open (char *in_pathname, char **fo
*** 167,179 ****
(in_pathname, O_RDONLY, &temp_pathname);
/* If not found, next search the inferior's $PATH environment
variable. */
! if (found_file < 0 && solib_search_path != NULL)
found_file = openp (get_in_environ (inferior_environ, "PATH"),
1, in_pathname, O_RDONLY, 0, &temp_pathname);
/* If not found, next search the inferior's $LD_LIBRARY_PATH
environment variable. */
! if (found_file < 0 && solib_search_path != NULL)
found_file = openp (get_in_environ (inferior_environ,
"LD_LIBRARY_PATH"),
1, in_pathname, O_RDONLY, 0, &temp_pathname);
--- 173,185 ----
(in_pathname, O_RDONLY, &temp_pathname);
/* If not found, next search the inferior's $PATH environment
variable. */
! if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ, "PATH"),
1, in_pathname, O_RDONLY, 0, &temp_pathname);
/* If not found, next search the inferior's $LD_LIBRARY_PATH
environment variable. */
! if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ,
"LD_LIBRARY_PATH"),
1, in_pathname, O_RDONLY, 0, &temp_pathname);
next reply other threads:[~2003-06-20 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-20 12:26 kewarken [this message]
2003-06-20 12:45 ` 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=Pine.CYG.4.55.0306200820260.3296@catdog.ott.qnx.com \
--to=kewarken@qnx.com \
--cc=gdb-patches@sources.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