[m-dev.] debugger command set

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 13 19:43:52 AEDT 1998


On 13-Nov-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> 
> [Peter Ross wrote:]
> > On another point, I think that the system wide mdbrc file should be
> > always be sourced, then if there is a local .mdbrc then its values
> > should override the ones in the system file.  It is extremely annoying
> > that I have to replicate the entire system file to alias p to print.

Well, actually you don't -- you can use the `source' command.

I agree the current design could be improved.  I don't think it is
something that we need to do before the 0.8 release, though.

> How about the following design.
> 
> - During initialization, the debugger executes the following algorithm:
> 
>   	source file named by MERCURY_DEBUGGER_DOC_INIT
>   	source file named by MERCURY_DEBUGGER_INIT

What's the reason for having both MERCURY_DEBUGGER_DOC_INIT
and MERCURY_DEBUGGER_INIT?  Why not have just the latter,
like we do currently?

> 	if .mdbrc exists
> 		source it
> 	else if ~/.mdbrc exists
> 		source it

I agree with Peter Schacte here, you should source both if they both exist.

So I would go for

	scripts/mdb:
		if MERCURY_DEBUGGER_INIT not set, set it to the appropriate
		default

	trace/mercury_trace_internal.c:
		first source file named by MERCURY_DEBUGGER_INIT
		then source ~/.mdbrc, if it exists
		then source .mdbrc, if it exists

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list