[m-rev.] for review: .decldebug

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Aug 20 16:59:32 AEST 2002


On 20-Aug-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> I modified all the files that mercury_grade.h says should be modified when
> adding a new grade, except mercury_compile.m, because I don't see anything
> in there that needs to be modified. Anyone know why it is included in the list
> in mercury_grade.h?

I think the relevant code which needs to be modified is now
in compile_target_code.m rather than mercury_compile.m.
This needs to pass the right flags to the C compiler
(in particular it needs to pass -DMR_DECL_DEBUG when appropriate).

> compiler/options.m:
> 	Add a new option, --decl-debug, that switches on declarative debugging.

The new option should be documented in doc/user_guide.texi.
So should the new grade component.

> Index: compiler/handle_options.m
> +                                { Error = yes("Specified trace level compatible with grade") }

s/compatible/incompatible/

> Index: compiler/options.m
> @@ -2651,6 +2654,12 @@
>  	write_tabbed_lines([
>  		"--debug\t\t\t\t(grade modifier: `.debug')",
>  		"\tEnable Mercury-level debugging.",
> +		"\tSee the Debugging chapter of the Mercury User's Guide",
> +		"\tfor details.",
> +		"\tThis option is not yet supported for the `--high-level-code'",
> +		"\tback-ends.",
> +		"--decl-debug\t\t\t\t(grade modifier: `.decldebug')",
> +		"\tEnable declarative debugging.",
>  		"\tSee the Debugging chapter of the Mercury User's Guide",
>  		"\tfor details.",
>  		"\tThis option is not yet supported for the `--high-level-code'",

The Mercury User's Guide does not contain any documentation of
declarative debugging.  So the pointer to the Debugging chapter
is a dangling pointer.

> Index: scripts/init_grade_options.sh-subr
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/scripts/init_grade_options.sh-subr,v
> retrieving revision 1.18
> diff -u -b -r1.18 init_grade_options.sh-subr
> --- scripts/init_grade_options.sh-subr	2001/05/31 06:00:20	1.18
> +++ scripts/init_grade_options.sh-subr	2002/08/19 10:37:34
> @@ -42,6 +42,7 @@
>  	--pic-reg
>  	--no-stack-trace
>  	--debug
> +	--decl-debug
>  		See the documentation in the \"Invocation\" section
>  		of the Mercury User's Guide."

This is another dangling pointer.

Otherwise that looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list