tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Estimated hours taken: 1.5
Branches: main
Fix Mantis bug #45, which was that mdb effectively ignored some commands
in .mdbrc files.
trace/mercury_trace_internal.[ch]:
trace/mercury_trace_command_queue.[ch]:
Move the code for manipulating the command queue from
mercury_trace_internal.c to a new module. This improves the level of
abstraction. The ultimate cause of the bug was a lack of abstraction.
The old code put commands from startup files in the command queue
in a mixed order: respecting order within each startup file, but
reversing order among startup files. The cause of the bug was
that the commands from .mdbrc files were put into the queue
*after* the commands from the system's standard startup file in time,
but *before* them in order, so the commands in the standard startup
file could override commands from .mdbrc files.
The fix is to consistently put commands in order: from the standard
system startup file, from .mdbrc, and from the environment.
Give better names to some functions.
Provide a mechanism for debugging the command queue mechanism.
trace/mercury_trace_cmd_backward.c:
Use those better names.
trace/Mmakefile:
Add the new module.
tests/debugger/mdbrc_test.{m,inp,exp,mdbrc}:
Add a regression test for this bug, a minimally modified version
of the bug demo program in Mantis.
tests/debugger/Mmakefile:
Enable the new test case, which specifies its own .mdbrc file.
tests/Mmake.common:
Provide a way for a test case to not use the .mdbrc file used by all
the other debugger tests, so it could specify its own.