Files
mercury/tests/debugger/declarative/func_call.exp
Mark Brown 81b64cf762 Distinguish between predicates and functions in the declarative debugger.
Estimated hours taken: 2.5

Distinguish between predicates and functions in the declarative debugger.

browser/declarative_execution.m:
	Add a pred_or_func field to trace_atom.

trace/mercury_trace_declarative.c:
	Construct trace atoms with the extra field.

browser/declarative_user.m:
	Print function call results using function syntax.

browser/debugger_interface.m:
browser/util.m:
	Move the definition of type pred_or_func to util.m, so it can
	be used by the declarative debugger as well as the external debugger.

runtime/mercury_stack_layout.h:
	Update a reference to the location of type pred_or_func.

tests/debugger/declarative/Mmakefile:
tests/debugger/declarative/func_call.{m,inp,exp}:
	Test case for the new feature.

tests/debugger/declarative/*.exp:
tests/debugger/declarative/*.exp2:
	Update expected output from tests.
2000-10-01 04:09:55 +00:00

27 lines
660 B
Plaintext

1: 1 1 CALL pred func_call:main/2-0 (det) func_call.m:8
mdb> echo on
Command echo enabled.
mdb> register --quiet
mdb> break fib
0: + stop interface func func_call:fib/2-0 (det)
mdb> continue
2: 2 2 CALL func func_call:fib/2-0 (det) func_call.m:14 (func_call.m:9)
mdb> finish -n
69: 2 2 EXIT func func_call:fib/2-0 (det) func_call.m:14 (func_call.m:9)
mdb> dd
fib(6) = 9
Valid? no
fib(5) = 6
Valid? no
fib(4) = 4
Valid? no
fib(3) = 3
Valid? yes
fib(1) = 1
Valid? yes
Found incorrect contour:
fib(4) = 4
Is this a bug? yes
35: 4 4 EXIT func func_call:fib/2-0 (det) func_call.m:14 (func_call.m:20)
mdb> quit -y