Estimated hours taken: 0.1
tests/debugger/queens.exp:
tests/debugger/browser_test.exp:
tests/debugger/interpreter.exp:
tests/debugger/interpreter.exp2:
Update the expected output for these test cases to reflect the
renumbering of mdb variables starting from 1 rather than from 0.
Estimated hours taken: 2
trace/mercury_trace_internal.c:
GNU readline always echos the inputs, so if readline support is
enabled, then ignore the MR_echo_commands variable,
and report an error if the user tries to use `echo off'.
Also, if we're not using readline, then echo the `echo on' command,
so that the output will be the same as with readline.
tests/debugger/*.inp:
Ensure that `echo on' is always the first command.
tests/debugger/*.exp:
tests/debugger/*.exp2:
Update to reflect the changes to *.inp,
and to include the echo of the `echo on' command.
(Also delete the mdb intro banners from *_lib.exp*,
because mdb is invoked with MERCURY_SUPPRESS_MDB_BANNER=yes.
The *_lib* files are in fact currently not used, so they should
probably be just deleted, I think. But I'll do that as
a separate change.)
Estimated hours taken: 0.1
tests/debugger/interpreter.exp2:
Fix the test result to match what is actually output:
delete the newline at the end of the file.
Estimated hours taken: 0.25
Fix some spurious test cases failures for the debugging test cases.
tests/debugger/*.exp2:
Add alternative expected outputs for the test cases that
produce different results when built in debug grades (i.e.
when linked with a library was built with debugging enabled).
Estimated hours taken: 2.75
Change the mdb `print' command so that it invokes the non-interactive
version of the term browser, and change the way the browser is invoked
so that the browser state is preserved across multiple invocations
of `print' or `browse' in a single mdb session.
browser/browse.m:
Make `browser_state' an abstract type.
Add new predicate `browse__init_state' to initialize that ADT.
Change the interface to `browse__browse' so that it takes and
returns the old and new browser_states.
Add a new predicate `browse__print' to replace the old
`browse__portray_root' predicate; this is the non-interactive
version of the browser. It calls io__write_univ if the term
is small enough, and browse__portray (with flat format) otherwise.
Export the `browse__print' and `browse__init_state' predicates to C.
Delete the predicates for formatting terms as strings, since that
code was a potential double-maintenance problem and was not needed.
library/io.m:
Export `io__write_univ', for use by browser/browse.m.
trace/mercury_trace_browse.h:
trace/mercury_trace_browse.c:
New files. These provide an interface to the browser
which preserves the browser state in a C static variable.
trace/Mmakefile:
Add the new files mercury_trace_browse.{h,c} to the appropriate
file lists.
trace/mercury_trace_internal.c:
Change the `browse' and `print' mdb commands to use the new
functions defined in mercury_trace_browse.{h,c} rather than
calling browser__browse and io__print (respectively), and don't
print a newline afterwards, since the browser does that itself.
Delete the old hack to avoid printing out HLDS and ModuleInfo,
since it's not necessary any more.
doc/user_guide.texi:
Update the documentation for the `browse' and `print' commands
to reflect these changes.
tests/debugger/*.exp:
tests/debugger/*.exp2:
Update the expected output from the debugger to reflect these changes.
Estimated hours taken: 0.5
Fix some spurious test cases failures for the debugging test cases.
tests/debugger/*.exp2:
Add alternative expected outputs for the test cases that
produce different results when built in debug grades (i.e.
when linked with a library was built with debugging enabled).