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

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Oct 2 20:26:07 AEST 1998


> *** DELETE EASY-TO-MISUSE MACROS ***
> 
> runtime/mercury_stacks.h:
> 	Delete the based_framevar and based_detstackvar macros, since their
> 	use can lead to off-by-one errors, and the saved_framevar and
> 	saved_detstackvar macros, since they are no longer used.
> 
> runtime/*.c
> 	Update any references to any macros removed from mercury_stacks.h.

That one looks OK. 

But there's one thing I want to check.
In mercury_layout_util.c you replaced `based_framevar' with `MR_based_framevar',
even though `based_framevar(n)' was defined as `MR_based_framevar(n+1)':

> -#define        based_framevar(base_curfr, n)   \
> -                       MR_based_framevar(base_curfr, n+1)
mercury_layout_util.c:
>                 case MR_LVAL_TYPE_FRAMEVAR:
> -                       if (MR_trace_print_locn) {
> +                       if (MR_print_locn) {
>                                 printf("framevar%d", locn_num);
>                         }
> -                       value = based_framevar(base_curfr, locn_num);
> +                       value = MR_based_framevar(base_curfr, locn_num);
>                         *succeeded = TRUE;
>                         break;

Is that a bug, or is that just an interaction with the other changes?

-- 
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