Commit Graph

8 Commits

Author SHA1 Message Date
Zoltan Somogyi
7df5045e93 Update expected outputs after my recent change ...
... and record the bootcheck grade of those expected output files.
2018-08-29 02:58:25 +10:00
Zoltan Somogyi
59b11f84ce Update the debugger test directory.
Replace __ with . as the module qualifier symbol.

Replace references to io.state with just io.

Replace DCGs with state variables.

Replace (C->T;E) syntax for if-then-elses with (if C then T else E) syntax.

Replace if-then-elses with switches when possible and where this does not
affect what is being tested.

Replace separate pred and mode declarations with predmode declarations.

Put predicate and function declarations just before the definition
of the predicate or function.

Delete unneeded module qualifications on predicate and function declarations
and definitions.

Update .exp files (and if needed, .inp files) for the line number changes
that result from the above.

For tests that have more than one .exp file and where one of those files
is affected by the above, add a section to the source file header that says
which .exp file is for what grade, with XXXs for the (as yet) unknown parts.
2018-08-28 21:20:59 +10:00
Zoltan Somogyi
33eb3028f5 Clean up the tests in half the test directories.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
    Make these tests use four-space indentation, and ensure that
    each module is imported on its own line. (I intend to use the latter
    to figure out which subdirectories' tests can be executed in parallel.)

    These changes usually move code to different lines. For the debugger tests,
    specify the new line numbers in .inp files and expect them in .exp files.
2015-02-14 20:14:03 +11:00
Zoltan Somogyi
32d85a300f Add a table for the less-than-fully-qualified names of modules,
Estimated hours taken: 3
Branches: main

trace/mercury_trace_tables.m:
	Add a table for the less-than-fully-qualified names of modules,
	allowing any prefix of the module name to be omitted.

	Use it to allow procedure specifications (e.g. in breakpoint commands)
	to use such module names, with fully qualified module names taking
	precedence over less-than-fully-qualified module names.

tests/debugger/breakpoints.{m,inp,exp*}:
tests/debugger/breakpoints.print_list.m:
tests/debugger/breakpoints.{a,b}.m:
tests/debugger/breakpoints.{a,b}.testmod.m:
	Update this test case to test the new functionality.
2004-01-21 04:55:50 +00:00
Zoltan Somogyi
6554ef7daa Replace "is" with "=".
Estimated hours taken: 2
Branches: main

Replace "is" with "=".
Add field names where relevant.
Replace integers with counters where relevant.
2003-05-26 09:01:46 +00:00
Simon Taylor
5b16c5f3d0 Fix bugs in the code to parse and match procedure
Estimated hours taken: 2.5
Branches: main

Fix bugs in the code to parse and match procedure
specifications for breakpoints:
- handle nested modules.
- handle names containing '/' and '-'.
- use the correct arity for functions, not the arity of the
  corresponding predicate.

trace/mercury_trace_tables.c:
	Fix the bugs.

runtime/mercury_stack_layout.h:
	Add a macro to adjust the arity of functions
	recorded in MR_Proc_Layouts for printing.

runtime/mercury_stack_trace.c:
	Print the correct arity of functions in stack traces
	and debugger events.

tests/debugger/breakpoints.m:
tests/debugger/breakpoints.print_list.m:
tests/debugger/breakpoints.inp:
tests/debugger/breakpoints.exp:
	Add test cases.

tests/debugger/existential_type_classes.exp:
tests/debugger/polymorphic_output.exp3:
tests/debugger/declarative/func_call.exp:
	Update expected output. (I'll update the other output
	files after this change is installed).
2002-02-11 12:52:55 +00:00
Zoltan Somogyi
3f84f112ec Handle ambiguous procedure specifications in the debugger's "break" command
Estimated hours taken: 3

Handle ambiguous procedure specifications in the debugger's "break" command
more usefully.

trace/mercury_trace_tables.[ch]:
	Add a function for returning all the procedures that match a
	specification.

trace/mercury_trace_internal.c:
	Use this function to present the user all the matches for the procedure
	specification if their specification matches more than one procedure,
	and let them choose whether they want to put a breakpoint on them all,
	and if not, which one to put the breakpoint on.

doc/user_guide.texi:
	Document the new functionality.

tests/debugger/breakpoints.{m,in,exp}:
	Introduce a function named "data" to go with the predicate, and check
	that the "break" command handles the ambiguity properly.
2000-08-25 09:53:37 +00:00
Zoltan Somogyi
f058c2f67f Add a new command to the debugger for deleting (as opposed to disabling)
Estimated hours taken: 5

Add a new command to the debugger for deleting (as opposed to disabling)
breakpoints.

doc/user_guide.texi:
	Document the delete command.

trace/mercury_trace_internal.c:
	Implement the delete command, and move all the code that deals with
	breakpoints to trace/mercury_trace_spy.c, with the exception of code
	for user interaction (since this will be different for e.g. the
	external debugger).

	In several places, update the code to reflect the fact that the
	spy points array may now have holes: entries holding deleted spy
	points.

trace/mercury_trace_spy.[ch]:
	Centralize the code for handling breakpoints here, and add a function
	for handling the deletion of a breakpoint.

tests/debugger/breakpoints.{m,inp,exp}:
	A new test case for exercising the new functionality. The code
	is the same as queens.m; it is the script that is different.

tests/debugger/Mmakefile:
	Turn on the new test case.
1999-10-07 09:31:41 +00:00