Estimated hours taken: 0.2
tests/debugger/all_solutions.{inp,exp,exp2}:
Register debuggable modules quietly, to avoid test failures from
spurious differences in the count of debuggable procedures.
Estimated hours taken: 8
Fix several bugs in retry.
trace/mercury_trace.c:
Fix three bugs reported by Fergus in the behavior of the mdb retry
command.
Catch the case where the retry command tries to retry a call that
would be an ancestor of main.
Catch the case where the retry command tries to retry a call that
is in shallow traced region of the computation tree.
Don't abort if the retried call is missing an I/O state argument
and relevant procedure was compiled without --trace-table-io; just
ask the user whether they want to proceed with the retry.
Add some conditionally compiled debugging code.
trace/mercury_trace.c:
trace/mercury_trace_spy.c:
Fix a bug unrelated to retry that was detected by new additions
to the test cases: spy points were being printed after being deleted.
Deletion was releasing some strings (filenames) in some spy points,
leading to those filename being printed as garbage. We now print the
spy points before deleting them. This required moving the code
for marking spy points as deleted from mercury_trace_spy.c to
mercury_trace.c.
compiler/trace.m:
Fix a bug that caused the debugger to core dump when given a retry
command that went across a shallow traced region of the program.
(This bug was exposed when I fixed the second bug reported by Fergus.)
A procedure that lives on the det stack that nevertheless pushes
temporary frames onto the nondet stack should save the original value
of maxfr on procedure entry even if it is shallow traced and from_full
is false, since the debugger will need to restore the value of maxfr
during retry.
tests/debugger/queens.{inp,exp,exp2}:
Test how mdb handles trying to retry an ancestor of main.
Test how mdb handles a retry with a missing I/O state argument.
tests/debugger/all_solutions.{m,inp,exp,exp2}:
New test case. The code is a copy of samples/solutions/all_solutions.m.
Its input script tests retry into and across a shallow traced region
(inside std_util:solutions).