diff options
author | Kung Hsu <kung@cygnus> | 1995-09-09 00:26:46 +0000 |
---|---|---|
committer | Kung Hsu <kung@cygnus> | 1995-09-09 00:26:46 +0000 |
commit | 6047ab6a19679c2032ddeff09adc8ecd108728bb (patch) | |
tree | 5a6f23e11da42b09a59ed66ddf519ca7dc19f017 /gdb/solib.c | |
parent | d55a826735387bd220612a7b6972d12185e40e4b (diff) | |
download | gdb-6047ab6a19679c2032ddeff09adc8ecd108728bb.zip gdb-6047ab6a19679c2032ddeff09adc8ecd108728bb.tar.gz gdb-6047ab6a19679c2032ddeff09adc8ecd108728bb.tar.bz2 |
* inferior.h: Add extern declaration of inferior_environ.
* solib.c (solib_map_sections): To get inferior's env instead of
gdb's for LD_LIBRARY_PATH, same for PATH.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r-- | gdb/solib.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/solib.c b/gdb/solib.c index 89d7e7d..c5ffa7a 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -47,6 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "frame.h" #include "regex.h" #include "inferior.h" +#include "environ.h" #include "language.h" #include "gdbcmd.h" @@ -238,12 +239,13 @@ solib_map_sections (so) filename = tilde_expand (so -> so_name); old_chain = make_cleanup (free, filename); - scratch_chan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0, - &scratch_pathname); + scratch_chan = openp (get_in_environ (inferior_environ, "PATH"), + 1, filename, O_RDONLY, 0, &scratch_pathname); if (scratch_chan < 0) { - scratch_chan = openp (getenv ("LD_LIBRARY_PATH"), 1, filename, - O_RDONLY, 0, &scratch_pathname); + scratch_chan = openp (get_in_environ + (inferior_environ, "LD_LIBRARY_PATH"), + 1, filename, O_RDONLY, 0, &scratch_pathname); } if (scratch_chan < 0) { |