[m-rev.] for review: add `track' mdb script

Ian MacLarty maclarty at csse.unimelb.edu.au
Tue May 29 18:22:34 AEST 2007


On Tue, May 29, 2007 at 03:39:11PM +1000, Julien Fischer wrote:
> 
>  On Tue, 29 May 2007, Ian MacLarty wrote:
> 
> > Index: doc/user_guide.texi
> > ===================================================================
> > RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
> > retrieving revision 1.520
> > diff -u -r1.520 user_guide.texi
> > --- doc/user_guide.texi	24 May 2007 01:37:47 -0000	1.520
> > +++ doc/user_guide.texi	29 May 2007 03:42:21 -0000
> > @@ -2848,6 +2848,23 @@
> > @end table
> >
> > @sp 1
> > + at table @code
> > + at item track @var{num} [@var{termpath}]
> > + at kindex track (mdb command)
> > +Goto the EXIT event of the procedure in which the subterm in argument
> > + at var{num} at term path @var{termpath} was bound,
> > +and display information about where the term was bound.
> > + at sp 1
> > +Note that this command just invokes a script that starts up the 
> > declarative
> > +debugger,
> > +browses the given argument,
> > +cd's to the given term path,
> > +invokes the declarative debugger @samp{track} command,
> > +invokes the declarative debugger @samp{info} command,
> > +and finally exits the declarative debugger using the @samp{pd} command.
> > + at end table
> > +
> 
>  How about:
> 
>  	Note that this command just invokes a script that is equivalent
>  	to the following sequence of commands:
> 
>  		dd
>  		browse $var{num}
> 
>  	etc.
> 

Done.

I also added an item to the NEWS file:

Index: NEWS
===================================================================
RCS file: /home/mercury1/repository/mercury/NEWS,v
retrieving revision 1.460
diff -u -r1.460 NEWS
--- NEWS	10 May 2007 05:55:37 -0000	1.460
+++ NEWS	29 May 2007 08:16:22 -0000
@@ -186,6 +186,10 @@
 * The extras distribution now includes a binding to the Allegro and
   AllegroGL game programming libraries.
 
+Changes to the Mercury debugger:
+
+* A `track' mdb command has been added.
+
 DETAILED LISTING
 ================
 
@@ -629,5 +633,11 @@
   algorithm used is a genetic algorithm, which can run in parallel over
   multiple hosts (by default, 1).
 
+Changes to the Mercury debugger:
+
+* A `track' mdb command has been added.  This command invokes the declarative
+  debugger and executes it's `track' command, before returning to the mdb
+  prompt.
+
 
 For news about earlier versions, see the HISTORY file.

>  ...
> 
> > Index: scripts/mdb_track
> > ===================================================================
> > RCS file: scripts/mdb_track
> > diff -N scripts/mdb_track
> > --- /dev/null	1 Jan 1970 00:00:00 -0000
> > +++ scripts/mdb_track	29 May 2007 03:18:17 -0000
> > @@ -0,0 +1,6 @@
> > +dd
> > +browse $1
> > +cd $2
> > +track
> > +info
> > +pd
> 
>  I mentioned this in person but for the record, if mdb is going to
>  support a scripting facility then we need the ability to add comments
>  to the scripts.
> 

Yes, I agree, although for now the scripts are very simple.

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