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

Ian MacLarty maclarty at csse.unimelb.edu.au
Tue May 29 13:51:48 AEST 2007


For review by anyone.

Estimated hours taken: 0.5
Branches: main

Add an mdb `track' command.  This command invokes an mdb script to start up
the declarative debugger, invoke the declarative debugger's `track' command
and then exit the declarative debugger.

doc/mdb_categories:
doc/user_guide.texi:
	Document the new command.

scripts/Mmakefile:
	Install the new script.

scripts/mdb_track:
	Add the new script.

scripts/mdbrc.in:
	Add an alias for the new script.

Index: doc/mdb_categories
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/mdb_categories,v
retrieving revision 1.36
diff -u -r1.36 mdb_categories
--- doc/mdb_categories	5 Dec 2006 03:51:11 -0000	1.36
+++ doc/mdb_categories	29 May 2007 03:21:56 -0000
@@ -21,7 +21,7 @@
 end
 document_category 300 backward
 backward   - Commands that move execution backward.
-             The only such command is `retry'.
+             The backward commands are `retry' and `track'.
 
 end
 document_category 400 browsing
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
+
+ at sp 1
 @node Browsing commands
 @subsection Browsing commands
 
Index: scripts/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmakefile,v
retrieving revision 1.41
diff -u -r1.41 Mmakefile
--- scripts/Mmakefile	13 Jun 2006 09:49:00 -0000	1.41
+++ scripts/Mmakefile	29 May 2007 03:35:35 -0000
@@ -51,7 +51,8 @@
 DEBUGGER_SCRIPTS = $(CONF_DEBUG_SCRIPTS) 	\
 		xul_tree.xsl			\
 		mdb_open			\
-		mdb_grep
+		mdb_grep			\
+		mdb_track
 
 EMACS_SCRIPTS = gud.el
 
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
Index: scripts/mdbrc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mdbrc.in,v
retrieving revision 1.7
diff -u -r1.7 mdbrc.in
--- scripts/mdbrc.in	13 Jun 2006 09:49:00 -0000	1.7
+++ scripts/mdbrc.in	29 May 2007 03:19:02 -0000
@@ -18,5 +18,6 @@
 alias	!	shell
 alias	open	source @DEFAULT_MERCURY_DEBUGGER_INIT_DIR@/mdb_open
 alias	grep	source @DEFAULT_MERCURY_DEBUGGER_INIT_DIR@/mdb_grep
+alias	track	source @DEFAULT_MERCURY_DEBUGGER_INIT_DIR@/mdb_track
 xml_browser_cmd '@DEFAULT_XML_BROWSER_CMD@'
 xml_tmp_filename '@DEFAULT_XML_TMP_FILENAME@'
--------------------------------------------------------------------------
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