* 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.
This commit is contained in:
parent
d55a826735
commit
6047ab6a19
2 changed files with 10 additions and 4 deletions
|
@ -1,5 +1,9 @@
|
||||||
Fri Sep 8 12:57:41 1995 Kung Hsu <kung@mexican.cygnus.com>
|
Fri Sep 8 12:57:41 1995 Kung Hsu <kung@mexican.cygnus.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
* solib.c (solib_map_sections): Copy full path name into so_list
|
* solib.c (solib_map_sections): Copy full path name into so_list
|
||||||
structure so that symbol_file_add can find it.
|
structure so that symbol_file_add can find it.
|
||||||
|
|
||||||
|
|
10
gdb/solib.c
10
gdb/solib.c
|
@ -47,6 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "regex.h"
|
#include "regex.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
#include "environ.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
|
|
||||||
|
@ -238,12 +239,13 @@ solib_map_sections (so)
|
||||||
filename = tilde_expand (so -> so_name);
|
filename = tilde_expand (so -> so_name);
|
||||||
old_chain = make_cleanup (free, filename);
|
old_chain = make_cleanup (free, filename);
|
||||||
|
|
||||||
scratch_chan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0,
|
scratch_chan = openp (get_in_environ (inferior_environ, "PATH"),
|
||||||
&scratch_pathname);
|
1, filename, O_RDONLY, 0, &scratch_pathname);
|
||||||
if (scratch_chan < 0)
|
if (scratch_chan < 0)
|
||||||
{
|
{
|
||||||
scratch_chan = openp (getenv ("LD_LIBRARY_PATH"), 1, filename,
|
scratch_chan = openp (get_in_environ
|
||||||
O_RDONLY, 0, &scratch_pathname);
|
(inferior_environ, "LD_LIBRARY_PATH"),
|
||||||
|
1, filename, O_RDONLY, 0, &scratch_pathname);
|
||||||
}
|
}
|
||||||
if (scratch_chan < 0)
|
if (scratch_chan < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue