mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
Estimated hours taken: 2
Branches: main
Fix a problem reported by Ian: the debugger ignored information about the head
variables of the predicates generated by the compiler from lambda expressions
because they didn't have names.
compiler/hlds_pred.m:
Add a predicate to ensure that all headvars have names.
compiler/lambda.m:
Call that predicate to give names to the predicates created from lambda
expressions.
compiler/code_gen.m:
Call that predicate to give names to the predicates created from lambda
expressions, in case other transformations also create predicates
with unnamed head variables.
doc/user_guide.texi:
Add a new mdb command, var_details, and a new method of invocation of
an existing mdb command, flag. I used them to track down this bug.
trace/mercury_trace_internal.c:
Implement the var_details mdb command, and the new method of invocation
of the flag command.
trace/mercury_trace_vars.[ch]:
Add a function to print variable details.
tests/debugger/mdb_command_test.inp:
Test the documentation of the new command.
tests/debugger/completion.exp:
Expect the new command.
tests/debugger/lambda_expr.{m,inp,exp}:
Add the new test case to test for the bug.
tests/debugger/Mmakefile:
Enable the new test case.
14 lines
109 B
Plaintext
14 lines
109 B
Plaintext
echo on
|
|
context none
|
|
register --quiet
|
|
step
|
|
print
|
|
up
|
|
print P
|
|
finish ; print
|
|
retry
|
|
print
|
|
finish
|
|
print
|
|
continue
|