Why does solib_open do what it does?
Andrew Cagney
ac131313@redhat.com
Wed Jun 18 19:20:00 GMT 2003
> * If available, use target defined search function.
>> > * Look in inferior's $PATH.
>> > * Look in inferior's $LD_LIBRARY_PATH.
>
>>
>> I rather think that $PATH and $LD_LIBRARY_PATH should be native-only.
>> But come to think of it, do remote targets even have environment
>
> variables?
>
>> And if so -- do they inherit them from gdb / the host? If there's a
>> gdbserver-type situation, and if the server is able to provide the true
>> environment variables from the target, then yes, we should use these.
>> But I don't recall any gdbserver ever offering that functionality.
>
>
> Our pdebug remote protocol allows us to 'set qnxinheritenv true/false'.
> This determines whether gdb will send it's environment to the target or
> whether the target will inherit from the pdebug server.
This is a long standing design bug.
When it comes to the environment, GDB should be strictly using target
vector methods. The native target could then look in the hosts
environment, the remote target query the remote end.
Andrew
More information about the Gdb
mailing list