Files
mercury/tests/debugger/ambiguity.inp
Zoltan Somogyi 0ecbc0efb0 Fix some bugs in the mdb "ambiguity" command, and add an enhancement to it.
Estimated hours taken: 2
Branches: main

Fix some bugs in the mdb "ambiguity" command, and add an enhancement to it.

doc/user_guide.texi:
	Document the enhancement: users can now restrict the set of modules
	in which the debugger looks for ambiguity.

tests/debugger/ambiguity.{m,inp,exp}:
	A new test case to check the new functionality and the bug fix.

tests/debugger/Mmakefile:
	Enable the new test.

trace/mercury_trace_tables.[ch]:
	Fix two bugs in the implementation of the function that implements
	the ambiguity command. One was that we neglected to differentiate
	between predicates and functions of the same name and arity. Another
	was that for functions, we used the wrong arity: the one after the
	addition of the result as an argument, not the one before.

	Add the ability to restrict the search to a list of named modules.

trace/mercury_trace_internal.c:
	Update the parsing of the command line for ambiguity commands to allow
	users to specify lists of module names.

	Fix an old bug, and make sure it never happens again. We used to
	pass the category and name of the current command every time we
	reported a syntax error, or called an option parsing routine (since it
	may have to report a syntax error). Since much of this code is best
	done via cut-and-paste, we often passed the wrong strings. For example,
	before this fix, a syntax error in an ambiguity command lead to a
	suggestion to do "help class_decl"!

	The fix is simply to record the category and name of the current
	command in a pair of variables, and refer to these variables when
	reporting syntax errors.

	Note that there are still mismaches in the names of categories
	between mercury_trace_internal.c and user_guide.texi. These should
	be fixed, but for now things are fine, since our current error messages
	don't include the category name.
2006-03-01 22:58:51 +00:00

5 lines
54 B
Plaintext

echo on
register --quiet
ambiguity ambiguity
continue