Files
mercury/tests/debugger/declarative/dd_params.exp
Julien Fischer fc94027616 Fix the failure of debugger/declarative/sort.m.
Estimated hours taken: 3
Branches: main, release

Fix the failure of debugger/declarative/sort.m.  The problem was that the
depth command in the declarative debugger did not affect the depth to which
I/O actions were printed.  This was because printing I/O actions uses the
`print all' configuration parameters and the `depth' command in the
declarative debugger only affects the `print' configuration parameters.  The
solution is to add four new formatting commands to the declarative debugger
(really just variants of the existing commands.)  These are `depth io', `size
io', `lines io' and `width io'.  These function identically to the `depth',
`size', `lines' and `width' commands except that they affect the `print all'
configuration parameters, rather the ones for `print'.

browser/declarative_user.m:
	Add the four new commands described above.

doc/user_guide.texi:
	Document the new commands.

browser/declarative_debugger.m:
	Fix some formatting.

tests/debugger/declarative/sort.inp:
tests/debugger/declarative/sort.exp:
	Use the new commands set the depth to which I/O actions are printed in
	the declarative debugger to an appropriate level for this test - it
	needs to be deep enough to print out the strings returned by
	read_line_as_string_2.

tests/debugger/declarative/dd_params.exp:
tests/debugger/declarative/dd_params.inp:
	Extend this test to cover the new commands.
2006-06-13 06:48:56 +00:00

96 lines
4.3 KiB
Plaintext

1: 1 1 CALL pred dd_params.main/2-0 (det) dd_params.m:10
mdb> echo on
Command echo enabled.
mdb> register --quiet
mdb> break p
0: + stop interface pred dd_params.p/2-0 (det)
mdb> continue
2: 2 2 CALL pred dd_params.p/2-0 (det) dd_params.m:22 (dd_params.m:11)
mdb> finish
3: 2 2 EXIT pred dd_params.p/2-0 (det) dd_params.m:22 (dd_params.m:11)
mdb> dd -d 3 -n 7
p(1, baz(1, bar))
Valid? params
Browser default format: flat
depth size width lines
Browser flat: 10 30 80 25
Browser verbose: 10 30 80 25
Browser pretty: 10 30 80 25
Browser raw_pretty: 10 30 80 25
Print default format: flat
depth size width lines
Print flat: 3 10 80 25
Print verbose: 3 10 80 25
Print pretty: 3 10 80 25
Print raw_pretty: 3 10 80 25
Printall default format: flat
depth size width lines
Printall flat: 3 10 80 2
Printall verbose: 3 10 80 5
Printall pretty: 3 10 80 2
Printall raw_pretty: 3 10 80 2
Number of I/O actions printed is: 20
dd> actions 10
dd> params
Browser default format: flat
depth size width lines
Browser flat: 10 30 80 25
Browser verbose: 10 30 80 25
Browser pretty: 10 30 80 25
Browser raw_pretty: 10 30 80 25
Print default format: flat
depth size width lines
Print flat: 3 10 80 25
Print verbose: 3 10 80 25
Print pretty: 3 10 80 25
Print raw_pretty: 3 10 80 25
Printall default format: flat
depth size width lines
Printall flat: 3 10 80 2
Printall verbose: 3 10 80 5
Printall pretty: 3 10 80 2
Printall raw_pretty: 3 10 80 2
Number of I/O actions printed is: 10
dd> depth 5
dd> size 5
dd> width 5
dd> lines 5
dd> depth io 10
dd> size io 10
dd> width io 10
dd> lines io 10
dd> params
Browser default format: flat
depth size width lines
Browser flat: 10 30 80 25
Browser verbose: 10 30 80 25
Browser pretty: 10 30 80 25
Browser raw_pretty: 10 30 80 25
Print default format: flat
depth size width lines
Print flat: 5 5 5 5
Print verbose: 5 5 5 5
Print pretty: 5 5 5 5
Print raw_pretty: 5 5 5 5
Printall default format: flat
depth size width lines
Printall flat: 10 10 10 10
Printall verbose: 10 10 10 10
Printall pretty: 10 10 10 10
Printall raw_pretty: 10 10 10 10
Number of I/O actions printed is: 10
dd> quit
Diagnosis aborted.
3: 2 2 EXIT pred dd_params.p/2-0 (det) dd_params.m:22 (dd_params.m:11)
mdb> continue
baz(1, bar)