mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Estimated hours taken: 3
Branches: main
Make the stack and nondet_stack commands in mdb limit the number of lines
printed, instead of the number of stack frames reported on.
runtime/mercury_stack_trace.[ch]:
Add a mechanism to limit the number of lines printed by stack traces.
trace/mercury_trace_internal.c:
Change the existing "stack" and "nondet_stack" mdb commands to make the
integer argument specify the number of lines printed by default, not
the number of stack frames reported on, since this is usually what is
wanted. The number of stack frames N to be reported on can still be
specified, via the new option -fN.
Add a new mdb command, "stack_default_limit", that specifies the
default number of lines to print in stack traces.
trace/mercury_trace_external.c:
Conform to the changed interfaces in mercury_stack_trace.h.
doc/user_guide.texi:
Document the changes to mdb commands.
tests/debugger/mdb_command_text.inp:
Test the documentation of the new command.
tests/debugger/completion.exp*:
Expect to see the new stack_default_limit command listed.
tests/debugger/queens.exp*:
Expect the new meaning of the stack command.
tests/debugger/nondet_stack.{inp,exp*}
Use the new -f option of the nondet_stack command to specify the
printing of the same number of frames as before. Update the expected
accordingly.
19 lines
238 B
Plaintext
19 lines
238 B
Plaintext
echo on
|
|
context none
|
|
register --quiet
|
|
goto 22
|
|
nondet_stack -f 3
|
|
nondet_stack
|
|
stack_regs
|
|
nondet_stack -d
|
|
goto 39
|
|
nondet_stack
|
|
stack_regs
|
|
nondet_stack -d
|
|
break nondet_stack__test
|
|
continue
|
|
nondet_stack
|
|
stack_regs
|
|
nondet_stack -d
|
|
continue -S
|