mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 13:23:53 +00:00
ea2c2ebeee1ef6ebb27881d3485d51bf0422e31e
Estimated hours taken: 3
Branches: main
Add an mdb command to save a term from the program being debugged to a file.
browser/browse.m:
Provide mechanisms to create browser terms from their components,
and to save browser terms to a named file.
trace/mercury_trace_browse.[ch]:
Provide access to these predicates from C code.
trace/mercury_trace_internal.c:
Implement a new mdb command, save_to_file, which saves a goal,
exception, procedure body or specified variable to a file.
doc/user_guide.texi:
doc/mdb_categories:
Document the new mdb command.
trace/mercury_trace_vars.[ch]:
Factor out the code for constructing the (components of) browser terms
from goals and variables from the code for browsing the resulting
terms, to allow them to be used also for saving those terms to a file.
tests/debugger/mdb_command_test.inp:
Test the documentation of the new command.
tests/debugger/completion.exp:
Update this test case both for the new command and for the previous one
I added (var_name_stats).
tests/debugger/browser_test.{m,inp,exp}:
Extend this test case to also test the behavior of the new command.
…
…
…
…
…
…
…
…
…
…
Reportedly Mercury does not work on Solaris 2.5.1 if it is compiled with
gcc 2.7.x. It should however work fine on Solaris 2.5.1 if you compile
it with gcc 2.8, or if you use gcc 2.7.x with an earlier version of Solaris.
The binary distribution for Solaris that we distribute was compiled
with gcc 2.7.2, so if you have Solaris 2.5.1, you may need to compile
Mercury yourself from our source distribution.
("Solaris 2.x" is also known as "SunOS 5.x".)
Languages
Mercury
85.3%
C
8.7%
Shell
1.4%
Makefile
1%
JavaScript
1%
Other
2.1%