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


Daniel Jacobowitz wrote:
On Fri, Nov 18, 2005 at 02:45:13PM +0000, Andrew STUBBS wrote:

	* cli-cmds.c: Include fcntl.h.
	(source_command): Use the GDB search path to find script files.

doc/
	* gdb.texinfo (Choosing files): Mention that -directory is used
	for script files.
	(Specifying source directories): Likewise.
	(Command files): Explain how script files are found.


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.


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.

Thanks

Andrew Stubbs


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