Estimated hours taken: 2
Branches: main
Make the mdb command "dump" give you a message confirming what it did.
trace/mercur_trace_cmd_browsing.c:
Make the mdb command "dump" give you a message confirming what it did,
unless the user gives the new -q or --quiet option.
doc/user_guide.texi:
Document the new option.
scripts/mdb_grep:
scripts/mdb_open:
Specify -q to keep old behavior.
tests/debugger/browser_test.{inp,exp,exp3}:
Update this test case to test the dump command both with and
without -q.
Estimated hours taken: 1
Branches: main
Ignore lines that start with `#' in sourced mdb scripts.
This is useful for documenting mdb scripts.
Create a local copy of the mdbrc file so that we can test new mdb scripts
in the test suite.
NEWS:
Mention the changes.
configure.in:
Create a copy of mdbrc.in in the tests directory and create an mdbrc
from this file using different substitutions than those used for the
mdbrc that will be installed. This is necessary so that we can use
the local mdbrc file when running the tests. Previously if the mdbrc
file was changed (for example a new alias was added), then we had to
install it before testing.
doc/user_guide.texi:
Document the new behaviour of the source command.
scripts/mdb_grep:
scripts/mdb_open:
scripts/mdb_track:
Add comments to these mdb scripts.
scripts/mdbrc.in:
Use a different substitution variable for the location of mdb_doc,
since for the test version of mdbrc mdb_doc will be in a different
location to the other scripts.
tests/Mmake.common:
Get mdb to use the local mdbrc when invoked for the tests.
Clean mdbrc and mdbrc.in.
tests/debugger/Mercury.options:
tests/debugger/Mmakefile:
tests/debugger/scripts.exp:
tests/debugger/scripts.inp:
tests/debugger/scripts.m:
Add a test case for the three existing mdb scripts.
trace/mercury_trace_readline.c:
trace/mercury_trace_readline.h:
Rename MR_trace_readline_expand_args to MR_trace_readline_from_script
and get it to ignore comment lines.
trace/mercury_trace_internal.c:
Adapt to changes in mercury_trace_readline.h.
Estimated hours taken: 0.1
Branches: main
scripts/mdb_grep:
scripts/mdb_open:
Replace "save_to_file" with "dump", since that mdb command has been
renamed.
Estimated hours taken: 5
Branches: main
Add a new mdb command, 'shell', that allows users to execute shell commands
from within the debugger.
Allow the user to give up to nine additional arguments to the 'source' command.
Occurrences of the strings "$1" through "$9" in the sourced file are replaced
by the corresponding additional arguments, allowing for parameterised scripts.
Use the two new features mentioned above to add two more mdb commands: one
to open a term, goal or exception in an external editor another command
to perform a grep on a term, goal or exception (useful for seeing if a value
occurs in a big map, for example).
NEWS
Mention the new commands.
doc/mdb_categories:
doc/user_guide.texi:
Document the new commands.
scripts/Mmakefile:
scripts/mdb_open:
scripts/mdb_vim:
Add scripts for the new commands.
scripts/mdbrc.in:
Add aliases for the new shell, emacs, grep and vim commands.
tests/debugger/completion.exp:
tests/debugger/mdb_command_test.inp:
Adjust for new commands.
tests/debugger/save.exp:
tests/debugger/save.exp2:
Adjust for new commands. Replace system dependent strings
with ZZZ instead of XXX.
tests/debugger/Mmakefile:
tests/debugger/shell.exp:
tests/debugger/shell.inp:
tests/debugger/shell.m:
tests/debugger/shell_test_script:
Test the shell and source commands.
trace/mercury_trace_cmd_misc.c:
Check if there are extra arguments to the source mdb command
and pass them to MR_trace_source if there are.
trace/mercury_trace_cmd_misc.h:
Add shell command handling function prototype.
trace/mercury_trace_declarative.c:
Call MR_trace_call_system_display_error_on_failure instead
of system when displaying benchmarking statistics for the
declarative debugger.
trace/mercury_trace_internal.c:
trace/mercury_trace_internal.h:
Implement the shell command and extend the source command
to handle the optional extra arguments.
trace/mercury_trace_readline.c:
trace/mercury_trace_readline.h:
Add a new function to read a line and replace all the
occurrences of "$[1-9]" with the corresponding value from an array.
Delete comments in the .c file that are duplicated in the .h file.
trace/mercury_trace_util.c:
trace/mercury_trace_util.h:
Implement MR_trace_call_system_display_error_on_failure that
executes a system call and displays an error message if the system
call terminates abnormally.