Files
mercury/tests/debugger/nondet_stack.inp
Zoltan Somogyi 4d443a5c9e Make the stack and nondet_stack commands in mdb limit the number of lines
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.
2005-01-17 05:58:10 +00:00

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