[m-rev.] for post-commit review: print trail state in mdb

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jun 10 13:05:30 AEST 2008


On Tue, 10 Jun 2008, Julien Fischer wrote:

> Index: runtime/mercury_trail.c
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_trail.c,v
> retrieving revision 1.14
> diff -u -r1.14 mercury_trail.c
> --- runtime/mercury_trail.c	10 May 2007 05:24:16 -0000	1.14
> +++ runtime/mercury_trail.c	8 Jun 2008 17:32:41 -0000
> @@ -72,7 +72,7 @@
>         }
>
>         MR_trail_ptr = tr_ptr;
> -        /* not needed, since MR_trail_ptr is never a real reg: */
> +        /* Not needed, since MR_trail_ptr is never a real reg: */
>         /* MR_save_transient_registers(); */
>         break;
>
> @@ -81,6 +81,18 @@
>     }
> }
>
> +
> +MR_Unsigned
> +MR_num_trail_entries(void)
> +{
> +#if defined(MR_THREAD_SAFE)
> +    return MR_trail_ptr -
> +        (MR_trailEntry *) MR_CONTEXT(MR_ctxt_trailzone)->MR_zone_min;
> +#else
> +    return MR_trail_ptr - (MR_TrailEntry *) MR_trail_zone->MR_zone_min;
> +#endif /* ! MR_THREAD_SAFE */
> +}
> +

I've corrected the typos in the above function.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list