This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH] Use search path for scripts


On Fri, Nov 25, 2005 at 06:07:58PM +0000, Andrew STUBBS wrote:
> Daniel Jacobowitz wrote:
> >Could you explain why you used the source path to search for scripts,
> >instead of a separate search path?  Was it just because it was handy?
> >Are scripts likely to be in manually-added directories on the source
> >search path?
> >
> >I don't see the correspondence.
> 
> Because it was handy, but who says it is the 'source search path'? It's 
> just that that's all it's been used for up till now.

... what?

It's the source search path because that's what it's used for.  It's
also documented that way:

`-directory DIRECTORY'
`-d DIRECTORY'
     Add DIRECTORY to the path to search for source files.

and

7.4 Specifying source directories
=================================

> The source directory is as likely a place as any for script files 
> (perhaps with some commands to help visualise the data). As it happens 
> we *always* add a directory (via -d in a wrapper) which contains nothing 
> but scripts, but since there are no sources that causes no problems.
> 
> Conversely, there's no technical reason why they couldn't have different 
> search paths. However, having more may lead to confusion, command/option 
> bloat, and the possibility that the user will have to add the same path 
> twice - once to each path.
> 
> If you wish I can split it out into a new list, with new commands, new 
> command-line options and new documentation. It solves the same problems 
> in the end.

Most users don't ever have to add a source path.  If you're using a
modern compiler, and debugging something built locally, and not using
certain kinds of include path constructs (which is unambiguously an
open, and recently discussed, bug in GDB) then GDB will Just Find
Things.

I don't find it intuitive that the same path should be overloaded this
way, and it makes changing the source searching algorithm even more
complicated.  However, I'd like to know if any other GDB maintainers
have an opinion on this before I ask you to modify the patch.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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