Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.
COPYING.LIB:
Add a special linking exception to the LGPL.
*:
Update references to COPYING.LIB.
Clean up some minor errors that have accumulated in copyright
messages.
runtime/*.[ch]:
trace/*.[chyl]:
As above. In some places, improve comments, e.g. by expanding contractions
such as "we've". Add #ifndef guards against double inclusion around
the trace/*.h files that did not already have them.
tools/*:
Make the corresponding changes in shell scripts that generate .[ch] files
in the runtime.
tests/*:
Conform to a slight change in the text of a message.
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.