[m-dev.] debugger command set
Zoltan Somogyi
zs at cs.mu.OZ.AU
Fri Nov 13 16:44:02 AEDT 1998
> 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.
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
if .mdbrc exists
source it
else if ~/.mdbrc exists
source it
- The mdb script by default sets the MERCURY_DEBUGGER_DOC_INIT
environment variable to point to the system's doc initialization file,
which is the doc/mdb_doc file autogenerated from user_guide.texi,
in its installed home. If the environment variable is already defined,
it leaves the preexisting value alone.
This way, people who want to implement (or use) new command sets can
override this environment variable, to point to a file that has the
alternate doc commands as well as the aliases needed to implement the
new command set, but noone else need worry about this aspect of
initialization.
- The mdb script by also sets the MERCURY_DEBUGGER_INIT environment
variable to point to a file that contains the default set of aliases,
if the user has not already set the environment variable to some other
value (which may be /dev/null).
Any comments, objections?
Zoltan.
More information about the developers
mailing list