[PATCH] Use search path for scripts

Eli Zaretskii eliz@gnu.org
Thu Nov 17 19:42:00 GMT 2005


> Date: Thu, 17 Nov 2005 11:45:45 +0000
> From: Andrew STUBBS <andrew.stubbs@st.com>
> Cc: gdb-patches@sources.redhat.com
> 
> If the current directory was searched first then a users own scripts may 
> accidentally (and silently) override the intended script causing a 
> support headache.
> 
> In short, the chosen strategy ensures that our product always works as 
> our customers expect.

Sorry, I don't think that the peculiar setup on your systems is a
reason good enough to change the current behavior in an incompatible
fashion.  Your specific problem could have been solved in a different
way, for example by having all your system-wide scripts begin with a
reserved string (you could make that string include some unusual
characters to minimize the possibility of a name clash with user
scripts).

> In addition, this way round you can always specify which file you mean 
> by adding './' whereas the other way round requires a lot more typing to 
> say what you mean when it doesn't do what you expect.

That could very well be so, but what you see as a disadvantage is what
happens today.  No doubt users are used to that extra typing when they
need it (which I suppose happens fairly rarely in most debugging
setups).



More information about the Gdb-patches mailing list