[m-dev.] for review: new debugger command set (part 1 of 4)

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Oct 13 03:59:54 AEST 1998


On 01-Oct-1998, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> SIMPLIFY THE MAINTAINANCE OF CONSISTENCY BETWEEN DEBUGGER CODE AND
> DOCUMENTATION 
> 
> doc/Mmakefile:
> 	Add rules for creating mdb_command_list, a C code fragment
> 	that can included manually in trace/mercury_trace_internal.c
> 	to supply the list of valid commands, and mdb_command_test.inp,
> 	which is a list of invalid invocations of debugger commands,
> 	which tests whether the help message for such invocations
> 	can be located as expected.
> 
> doc/generate_mdb_command_list:
> doc/generate_mdb_command_test:
> 	Awk scripts to create mdb_command_list and mdb_command_test.inp
> 	respectively from mdb_doc.
> 
> tools/bootcheck:
> 	Copy mdb_command_test.inp from doc to tests/debugger.
> 
> tests/debugger/Mmakefile:
> 	Add a new test that checks whether we get an internal error, unable
> 	to locate the right help node, for each invalid command invocation in
> 	mdb_command_test.inp.
...
> +++ generate_mdb_command_list	Fri Sep 25 18:35:12 1998
> @@ -0,0 +1,4 @@
> +#!/usr/bin/awk -f

You should use

	#!/bin/sh
	awk -e '
		...
	'

instead of `#!/usr/bin/awk -f', because this avoids hard-coding the
location of `awk' as `/usr/bin' -- not all systems have `awk' in
`/usr/bin'.

Also a brief comment at the top of this file explaining its purpose
would be a good idea.  Oh, and it should have a copyright notice.

> +++ generate_mdb_command_test	Thu Oct  1 12:25:28 1998
> +#!/usr/bin/awk -f

Likewise.

>  
>  depend:		$(DEPENDS)
>  
> -check:		$(OUTS) $(RESS)
> +check:		$(OUTS) $(RESS) mdb_command_test.res

I think it would make more sense to add `mdb_command_test.res'
to the $(RESS) variable.

Apart from that, this change ("SIMPLIFY THE MAINTAINANCE OF CONSISTENCY
BETWEEN DEBUGGER CODE AND DOCUMENTATION") looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list