Estimated hours taken:
tests/debugger/exception_cmd.*:
New test case to test the "exception" command.
tests/debugger/exception_vars.*:
Put this test case back the way it was.
Mmakefile:
Enable the new test case.
Estimated hours taken: 0.5
Add a new debugger command, excp, that continues forward execution until it
reaches an exception event (or the program exits). This command was requested
by MC.
doc/user_guide.texi:
Document the new command.
trace/mercury_trace.[ch]:
Add a forward movement operation that stops only at the first exception
event.
trace/mercury_trace_internal.c:
Implement the excp command using the new operation.
tests/debugger/exception_vars.{inp,exp,exp2}:
Test the operation of the new command.
tests/debugger/mdb_command_test.inp:
Test the documentation of the new command.
Estimated hours taken: 0.25
tests/debugger/exception_vars.inp:
tests/debugger/exception_vars.exp:
tests/debugger/exception_vars.exp2:
Add "echo on" at the start of the test case,
so that it gets the right results when the
compiler is configured without readline support.
Estimated hours taken: 3
Fix two related bugs in the debugger. The first was that the code in jumpopt.m
for preventing the redirecting of call returns away from labels with layout
structures was only partially effective, since some call return sites have
their layout structures generated only *after* optimization. The second bug
was that the exception events generated by library/exception.m took the label
layouts of call return sites within a predicate and passed them to MR_trace
as if they were the layouts of compiler-generated trace events. However,
while at compiler-generated trace events, all the variables mentioned in the
associated layout structure are supposed to be live, at return sites only
the variables stored in stack slots are live.
compiler/jumpopt.m:
Do not redirect call returns if execution tracing is enabled.
compiler/optimize.m:
Pass the trace level to jumpopt.m.
trace/mercury_trace_vars.[ch]:
Remember the port type of the event, and do not consider the registers
to contain valid contents even at ancestor level zero if the port type
is exception.
trace/mercury_trace_{in,ex}ternal.c:
Pass the port type to mercury_trace_vars.c.
tests/debugger/exception_vars.{m,inp,exp,exp2}:
Regression test for the fixed bugs. The .exp2 file is not yet filled
in.
tests/debugger/Mmakefile:
Enable the new test case.