[m-dev.] for review: Added a new format "newpretty" to the browser.
Sarvamanan THURAIRATNAM
sthur at students.cs.mu.oz.au
Tue Feb 20 16:50:52 AEDT 2001
Estimated hours taken : 185
For Fergus Henderson to Review.
Added a new pretty printing format to the term browser. This new format
helps put a limit on the size of the term printed during debugging.
This limit is specified by setting the number of lines you want the term
to be
printed on and the width of these lines. Refer to sized_pretty.m for
Examples.
browser/sized_pretty.m:
New file that does what's described above.
browser/browse.m:
browser/browser_info.m:
browser/mdb.m:
browser/parse.m:
trace/mercury_trace_browse.c:
trace/mercury_trace_browse.h:
trace/mercury_trace_internal.c:
Modified to accommodate the new format.
tests/debugger/browse_pretty.inp:
tests/debugger/browser_test.inp:
Included test cases for the new pretty printing format.
tests/debugger/browse_pretty.exp:
tests/debugger/browser_test.exp:
Changed the expected output.
Sorry! I forgot to change tests/debugger/browser_test.inp and
browser_test.exp
Index: tests/debugger/browser_test.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/browser_test.exp,v
retrieving revision 1.9
diff -u -r1.9 browser_test.exp
--- tests/debugger/browser_test.exp 2000/10/27 08:38:54 1.9
+++ tests/debugger/browser_test.exp 2001/02/20 04:48:54
@@ -27,7 +27,7 @@
mdb> set -AP format flat
mdb> print -f 1
HeadVar__1 big(big(big(small, 1, small), 2, small), 3, big(big(small, 4, big/3), 6, small))
-mdb> print -p 1
+mdb> print -r 1
HeadVar__1
big(
big(big(small, 1, small), 2, small),
@@ -52,6 +52,12 @@
2-6
3-small
+mdb> print -p 1
+ HeadVar__1
+big(
+ big(big(small, 1, small), 2, small),
+ 3,
+ big(big(small, 4, big(small, 5, small)), 6, small))
mdb> print --xyzzy 1
print: unrecognized option `--xyzzy'
mdb: print: usage error -- type `help print' for help.
Index: tests/debugger/browser_test.inp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/browser_test.inp,v
retrieving revision 1.5
diff -u -r1.5 browser_test.inp
--- tests/debugger/browser_test.inp 2000/10/27 08:38:55 1.5
+++ tests/debugger/browser_test.inp 2001/02/20 04:44:46
@@ -7,8 +7,9 @@
browse 1; ls; quit
set -AP format flat
print -f 1
-print -p 1
+print -r 1
print -v 1
+print -p 1
print --xyzzy 1
browse 1; print; quit
browse -f 1; ls; quit
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list