mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-16 22:35:41 +00:00
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.
This directory contains the source for The Mercury user's guide The Mercury language reference manual The Mercury library reference manual The Prolog to Mercury transition guide The Mercury frequently asked questions list The master copy of each document is stored in texinfo format, from which the info, dvi and html versions are derived automatically. You can create postscript versions from either the dvi or html versions. Due to the large spacing in texinfo-generated dvi files, the postscript file generated from the html (manually via a browser such as xmosaic) will be considerably shorter than the one derived from the dvi file. The source for the Mercury library reference manual is generated automatically from the library source files themselves.