Files
mercury/tests/debugger/polymorphic_output.exp
Zoltan Somogyi e60f641d9b Make it possible to save the state of a debugger session wrt break points
Estimated hours taken: 6

Make it possible to save the state of a debugger session wrt break points
and aliases in a file that can be sourced in another debugger session to
restore the state.

trace/mercury_trace_internal.c:
	Add a new mdb command, "save <filename>", to save mdb's state to the
	named file.

	Allow the "disable", "enable" and "delete" commands to be given without
	arguments; such invocations refer to the most recently created
	breakpoint. The extension to "disable" is required by the
	implementation of the "save" command; the others are for symmetry.

	Allow the user to speficy an option to the source command that tells
	mdb not to complain if the named file cannot be processed. This should
	allow people to put into .mdbrc files commands to source saved state
	files if they exist and not get complaints if they don't.

	Make several messages conform to our convention that error messages
	start with "mdb: ".

trace/mercury_trace_spy.[ch]:
	Add code to implement the part of the "save" command concerned with
	breakpoints. Unfortunately, there is no simple way to save the
	specification of breakpoints created with "break here", so for the time
	being they are not saved. This should not be too much of a problem,
	since such breakpoints are rarely used.

	Maintain a variable that identifies the most recently added breakpoint,
	if any.

	Also move the function to print out breakpoints here from
	mercury_trace_internal.c, in order to centralize knowledge
	about breakpoints here.

trace/mercury_trace_alias.[ch]:
	Add code to implement the part of the "save" command concerned with
	aliases.

	Fix some occurrences of an old bug: use MR_free, not free, to free
	strings allocated with MR_copy_string.

trace/mercury_stack_trace.[ch]:
	Add a version of MR_print_proc_id that prints proc ids in a form
	suitable for mdb procedure specifications.

doc/user_guide.texi:
	Document the "save" command and the new usage modes of the other
	modified commands.

tests/debugger/mdb_command_test.inp:
	Test the existence of documentation for the "save" command.

tests/debugger/polymorphic_output.exp:
	Update an expected error message.
2000-09-01 00:50:29 +00:00

14 lines
425 B
Plaintext

1: 1 1 CALL pred polymorphic_output:main/2-0 (det) polymorphic_output.m:20
mdb> echo on
Command echo enabled.
mdb> register --quiet
mdb> context none
Contexts will not be printed.
mdb> b std_util__det_arg
mdb: there is no such procedure.
mdb> c
Uncaught exception:
Software Error: det_arg: argument number out of range
Last trace event was event #7.
Last trace event before the unhandled exception was event #4.