Files
mercury/tests/debugger/tabled_read_decl.exp
Zoltan Somogyi d4ecc19cc5 Improve mdb's "print io" command.
trace/mercury_trace_cmd_browsing.c:
    Lift the hard-wired limit on printing a maximum of 20 I/O actions at once
    by adding the option "-m max" to the "print io" command. Keep the default
    at 20 for its "print io" form, which prints the next batch of I/O actions,
    but move it up to 500 for the "print io *" form, which is intended
    to print *all* I/O actions.

    Use separate functions for processing the options of the "print" and
    "browse" mdb commands. The new -m option applies only to the print command,
    while the existing -w and -x options apply only to the browse command.

    Make "print io N" print the same out-of-range error message as
    "print io N-M". This inconsistency was an oversight.

doc/user_guide.texi:
    Document the changes above. Document some previously existing aspects
    of the "print io" command that should have been documented but weren't.

    Change some other documentation to refer to "I/O actions" instead of
    just "io actions".

tests/debugger/tabled_read_decl.exp:
    Expect the updated error message for an out-of-range  "print io N".

tests/debugger/tabled_typeclass.{inp,exp,exp2}:
    Print the I/O actions we want using a single "print -m 100 io *" command.
2018-08-08 10:48:54 +10:00

93 lines
3.0 KiB
Plaintext

E1: C1 CALL pred tabled_read_decl.main/2-0 (det) tabled_read_decl.m:23
mdb> echo on
Command echo enabled.
mdb> register --quiet
mdb> context none
Contexts will not be printed.
mdb> table_io allow
mdb> table_io
I/O tabling has not yet started.
mdb> break tabled_read_decl__test
0: + stop interface pred tabled_read_decl.test/5-0 (det)
mdb> table_io start
I/O tabling started.
mdb> continue
E2: C2 CALL pred tabled_read_decl.test/5-0 (det)
mdb> finish -n
E3: C2 EXIT pred tabled_read_decl.test/5-0 (det)
mdb> print *
Stream (arg 1) c_pointer(0xXXXX)
SoFar (arg 2) 0
N (arg 3) 123
mdb> retry -o -a
E2: C2 CALL pred tabled_read_decl.test/5-0 (det)
mdb> print *
Stream (arg 1) c_pointer(0xXXXX)
SoFar (arg 2) 0
mdb> finish -n
E3: C2 EXIT pred tabled_read_decl.test/5-0 (det)
mdb> print *
Stream (arg 1) c_pointer(0xXXXX)
SoFar (arg 2) 0
N (arg 3) 123
mdb> break tabled_read_decl__poly_test
1: + stop interface pred tabled_read_decl.poly_test/6-0 (det)
mdb> continue
123
E4: C3 CALL pred tabled_read_decl.poly_test/6-0 (det)
mdb> finish -n
E5: C3 EXIT pred tabled_read_decl.poly_test/6-0 (det)
mdb> print *
Stream (arg 1) c_pointer(0xXXXX)
Unused (arg 2) ['a', 'b', 'c']
SoFar (arg 3) 0
N (arg 4) 456
mdb> retry -o -a
E4: C3 CALL pred tabled_read_decl.poly_test/6-0 (det)
mdb> finish -n
E5: C3 EXIT pred tabled_read_decl.poly_test/6-0 (det)
mdb> print *
Stream (arg 1) c_pointer(0xXXXX)
Unused (arg 2) ['a', 'b', 'c']
SoFar (arg 3) 0
N (arg 4) 456
mdb> delete *
0: E stop interface pred tabled_read_decl.test/5-0 (det)
1: E stop interface pred tabled_read_decl.poly_test/6-0 (det)
mdb> break part_2
0: + stop interface pred tabled_read_decl.part_2/3-0 (det)
mdb> continue
456
E6: C4 CALL pred tabled_read_decl.part_2/3-0 (det)
mdb> table_io end
I/O tabling stopped.
mdb> print action 0
open_input("tabled_read_decl.data", 0, c_pointer(0xXXXX))
mdb> print action 1
read_char_code(c_pointer(0xXXXX), 49)
mdb> browse action 1
browser> p
read_char_code(c_pointer(0xXXXX), 49)
browser> ^1
browser> p
c_pointer(0xXXXX)
browser> quit
mdb> print action 2
read_char_code(c_pointer(0xXXXX), 50)
mdb> print action 3
read_char_code(c_pointer(0xXXXX), 51)
mdb> print action 4
read_char_code(c_pointer(0xXXXX), 10)
mdb> print action 5
poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 52)
mdb> print action 6
poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 53)
mdb> print action 7
poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 54)
mdb> print action 8
poly_read_char_code(list(character), c_pointer(0xXXXX), ['a', 'b', 'c'], 10)
mdb> print action 9
I/O tabling has only recorded actions 0 to 8.
mdb> continue -S
789