This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: Initialize solib search psth from environ variable


On Wed, Nov 01, 2000 at 11:36:48AM +1100, Andrew Cagney wrote:
>Michael Snyder wrote:
>> 
>> This patch would check the environment variables SOLIB_SEARCH_PATH
>> and SOLIB_ABSOLUTE_PREFIX once, at start-up, and use them to set the
>> corresponding gdb state variables.
>> 
>> 2000-10-31  Michael Snyder  <msnyder@cleaver.cygnus.com>
>> 
>>         * solib.c (initialize_solib): Initialize solib_absolute_prefix
>>         and solib_search_path from the environment variables
>>         SOLIB_ABSOLUTE_PREFIX and SOLIB_SEARCH_PATH, if they're defined.
>
>As it currently stands, I don't like this patch.  It introduces (more)
>obscure undocumented behavour into GDB and its CLI.
>
>I think there first needs to be a clear policy on the question of should
>a GDB (native or cross) take information from the host environment (1). 
>Then, if the decision is yes, a clearly documented convention on how to
>implement this behavour (nameing convention, semantics, ...).
>
>My personal preference is to not add this feature.  I think that
>.gdbinit files and explicit command line options/commands would be more
>useful.  Having GDB silently pick things up from a host environment
>(especially in a test situtation) will just make things more confusing.

I agree with this.  When I first started working on Cygwin, I pushed to
have all of the various environment variables eliminated in favor of
one environment variable called 'CYGWIN'.  I didn't want to engender
the overhead of reading a file in Cygwin's case, or I might have lobbied
for that, too.

If we do decide to use environment variables, how about just using one?
In that case we could have something like:

export GDB='solib_absolute_prefix solib_search_path'

cgf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]