mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 15:26:31 +00:00
Estimated hours taken: 16
Branches: main, release
Replace the "set" command of mdb with a bunch of commands: the `format',
`format_param', `list_context_lines', `list_path', `xml_browser_cmd',
`xml_tmp_filename', `fail_trace_counts', `pass_trace_counts' and
`max_io_actions' commands. Each of these set just one parameter
or one of set of closely related parameters.
Move all these commands, and some existing commands that set parameters
that were elsewhere, to the "parameter" command category.
Extend some of these commands so that if given no arguments, they report
the current values of the parameters they would otherwise set.
Replace the "set" commands of the mdb browser and of the declarative debugger
with a bunch of commands: "format", "depth", "size", "width", "lines",
"actions" and "params" (the last prints the current value of the parameters).
For each category of mdb commands, create files mercury_trace_cmd_<cat>.[ch],
and move the functions dealing with that category of commands there from
mercury_trace_internal.c. Give each of these new files a logical structure
that was sometimes missing from the relevant parts of mercury_trace_internal.c.
NEWS:
Mention these changes.
doc/mdb_categories:
Document these changes.
doc/user_guide.texi:
Document these changes.
Fix an old documentation bug: you couldn't set listing paramaters
from a declarative debugger command.
Fix an old documentation bug: the description of the goal_path step
for scopes was obsolete.
Fix some obsolete references to : as module qualifier.
browser/parse.m:
Update the browser command set along the lines at the top.
browser/declarative_user.m:
Update the declarative debugger command set along the lines at the top.
Move the declaration for the type representing declarative debugger
commands to near the top of the file.
browser/browser_info.m:
Provide some access predicates.
Update the predicate that generates mdb commands to save the persistent
state of the debugger to generate the new forms of parameter commands.
Move types and predicates for dealing with browser parameters from
browse.m to here, so that declarative_user.m can use them too.
browser/browse.m:
Delete the code moved to browser_info.m, and conform to the other
changes in the other modules.
browser/listing.m:
Provide a predicate to return the type of listing paths.
scripts/mdbrc.in:
Update the commands that set the XML parameters.
scripts/Mmakefile:
Get mmake to rebuild mdbrc from mdbrc.in when mdbrc.in changes.
trace/mercury_trace_internal.c:
trace/mercury_trace_cmds.h:
trace/mercury_trace_cmd_*.[ch]:
Implement the changes described at the top.
Fix an old bug: the commands that update the search path for the "list"
command don't make the search path term permanent, which is needed in
non-conservative-gc grades.
trace/mercury_trace_spy.c:
Fix some obsolete references to : as module qualifier.
trace/mercury_trace_browse.[ch]:
Delete the functionality now moved to mercury_trace_cmd_parameter.c.
tests/debugger/mdb_command_test.inp:
Update the set of commands being tested.
tests/debugger/save.{inp,exp}:
Update the parameter commands in this test case.
94 lines
3.7 KiB
Plaintext
94 lines
3.7 KiB
Plaintext
document_category 100 concepts
|
|
concepts - The concepts on which the Mercury debugger is based.
|
|
The concepts for which documentation is available are
|
|
`break_points', `strict_commands', `print_level',
|
|
`default_print_level', `current_environment', `held_variables'
|
|
`procedure_specification' and `decl_debug'.
|
|
|
|
end
|
|
document_category 150 queries
|
|
queries - Commands for invoking goals interactively.
|
|
The commands for queries are
|
|
`query', `cc_query', and `io_query'.
|
|
|
|
end
|
|
document_category 200 forward
|
|
forward - Commands that move execution forward.
|
|
The forward commands are `step', `goto', `next', `finish',
|
|
`exception', `forward', `mindepth', `maxdepth' and `continue'.
|
|
|
|
end
|
|
document_category 300 backward
|
|
backward - Commands that move execution backward.
|
|
The only such command is `retry'.
|
|
|
|
end
|
|
document_category 400 browsing
|
|
browsing - Commands that let users explore the state of the computation.
|
|
The browsing commands are `vars', `held_vars', `print', `browse',
|
|
`stack', `up', `down', `level', `current', `view', `hold',
|
|
`diff', `dump', and `list'.
|
|
|
|
end
|
|
document_category 500 breakpoint
|
|
breakpoint - Commands that let users set and control breakpoints.
|
|
The breakpoint commands are `break', `condition', `disable',
|
|
`enable', `delete', `modules', `procedures' and `register'.
|
|
|
|
end
|
|
document_category 600 io_tabling
|
|
io_tabling - Commands that let users control the tabling of I/O actions.
|
|
The only such command is `table_io'.
|
|
|
|
end
|
|
document_category 700 parameter
|
|
parameter - Commands that let users access debugger parameters.
|
|
The parameter commands are `mmc_options', `printlevel', `scroll',
|
|
`stack_default_limit', `goal_paths' `scope', `echo',
|
|
`context', `list_context_lines', `list_path', `push_list_dir',
|
|
`pop_list_dir', `fail_trace_counts', `pass_trace_counts',
|
|
`max_io_actions', `xml_browser_cmd', `xml_tmp_filename',
|
|
`format', `format_param', `alias' and `unalias'.
|
|
|
|
end
|
|
document_category 800 help
|
|
help - Commands that let users access and control the help system.
|
|
The help commands are `document_category', `document' and `help'.
|
|
For help on the `help' command, type `help help help'.
|
|
|
|
end
|
|
document_category 850 mdb_dd
|
|
mdb_dd - mdb commands related to declarative debugging. These are `dd',
|
|
`trust', `trusted' and `untrust'.
|
|
|
|
end
|
|
document_category 860 decl
|
|
decl - Commands available from within the declarative debugger. These
|
|
are `yes', `no', `inadmissible', `trust', `skip', `browse',
|
|
`print', `set', `help', `info', `ask', `mark', `pd' and `quit'.
|
|
|
|
end
|
|
document_category 900 misc
|
|
misc - Commands that are of interest to most users but do not fit into
|
|
other categories. The misc commands are `source', `save' and
|
|
`quit'.
|
|
|
|
end
|
|
document_category 1000 exp
|
|
exp - Commands that let users collect and inspect experimental
|
|
data about the behavior of the program. The exp commands are
|
|
`histogram_all', `histogram_exp', and `clear_histogram'.
|
|
|
|
end
|
|
document_category 1100 developer
|
|
developer - Commands that are intended to be of use only to developers
|
|
of the Mercury implementation. The developer commands are
|
|
`flag', `subgoal', `consumer', `gen_stack', `cut_stack,
|
|
`pneg_stack', `mm_stacks', `nondet_stack', `stack_regs',
|
|
`all_regs', `debug_vars', `stats', `print_optionals',
|
|
`unhide_events', `dd_dd', `table', `type_ctor', `class_decl',
|
|
`all_type_ctors', `all_class_decls', `all_procedures' and
|
|
`ambiguity'.
|
|
|
|
end
|