Commit Graph

6 Commits

Author SHA1 Message Date
Simon Taylor
9ba3b14098 Make all the modules in the browser library sub-modules of
Estimated hours taken: 1

Make all the modules in the browser library sub-modules of
module `mdb', to avoid link errors when users use module names
such as `parse'.

browser/Mmakefile:
browser/browser_library.m:
browser/mdb.m:
	Rename browser_library.m to mdb.m.
	Change `:- import_module' declarations to
	`:- include_module' declarations.

browser/Mmakefile:
	Remove the special case rule for `mer_browser.init' --
	it doesn't work when the file names are not the same
	as the module name. Instead, the default rule for `mdb.init'
	is used and the output is copied to `mer_browser.init'.

browser/.cvsignore:
	Rename header files, etc.

browser/*.m:
	Add a `mdb__' prefix to the names of modules in the browser library
	in `:- module' and `:- import_module' declarations.

trace/*.c:
	Rename the header files for the browser library in
	`#include' statements.

tests/hard_coded/Mmakefile:
tests/hard_coded/parse.m:
tests/hard_coded/parse.exp:
	Test case.
2000-02-04 03:45:53 +00:00
Mark Brown
07cad7c169 If calling from the internal debugger, use readline input for the
Estimated hours taken: 6

If calling from the internal debugger, use readline input for the
interactive term browser and interactive queries.

browser/browse.m:
	Change some if-then-elses to switches, which will help
	catch errors if a new functor is added to the debugger type.

browser/parse.m:
browser/util.m:
	Return a string from util__trace_getline/4 rather than a
	list of chars, which saves converting from a string to a list
	of chars and then back again.

browser/util.m:
	Add a version of util__trace_getline that also takes I/O
	stream arguments.  Pass these arguments to MR_trace_getline.

browser/declarative_oracle.m:
	Call util__trace_getline/4 to do input via readline (if
	available).  Improve error handling.

browser/interactive_query.m:
	Call util__trace_getline to get user input, instead of
	standard library predicates.

runtime/mercury_init.h:
runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
trace/mercury_trace_internal.c:
trace/mercury_trace_internal.h:
	Add two I/O stream arguments to MR_trace_getline.
1999-05-30 03:55:13 +00:00
Erwan Jahier
045aa58368 Incorporate the term brower stuff in the external debugger.
Estimated hours taken: 20

Incorporate the term brower stuff in the external debugger.

browser/browse.m:
	Define browse__browse_external() which is the same as browse__browse()
	but for the case where the term browser is called from the external
	debugger.

	Add an argument in predicates that need it to indicate whether the term
	browser was called from the external or the internal debugger.

	Define write_string_debugger/4, nl_debugger/3, write_int_debugger/4,
	print_format_debugger/4 predicates and call them in place of
	io__write_string/4, io__nl/3, io__write_int/4, and io__print/4
	respectively. If the term browser is called from the internal debugger,
	those predicates call the predicates they replace; otherwise, they
	send their argument to the socket via a term of type
	term_browser_response.


browser/debugger_interface.m
	Define a new debugger request `browse/1'.

	Define get_variable_name/2 that allows to retrieve from
	mercury_trace_external.c the name of the variable to browse.

browser/parse.m:
	Define parse__read_command_external/3 that parses the browser command
	sent through the socket.

runtime/mercury_layout_util.c:
trace/mercury_trace_internal.c:
	Move the definition of MR_trace_find_var() and
	MR_trace_validate_var_count() from mercury_trace_internal.c to
	mercury_layout_util.c to make it available to the external debugger.

runtime/mercury_layout_util.h:
trace/mercury_trace_internal.c:
	Move the definition of MR_Var_Spec_Kind and MR_Var_Spec from
	mercury_trace_internal.c to mercury_layout_util.h to make it
	available to mercury_layout_util.c.

trace/mercury_trace_browse.ch:
	Define the function MR_trace_browse_external() which is the same
	as MR_trace_browse() except it uses the external debugger socket
	instead of mdb_in and mdb_out.

trace/mercury_trace_external.c:
	Define MR_trace_browse_one_external(), MR_trace_browse_var_external()
	which are the same as MR_trace_browse_one() and MR_trace_browse_var()
	of mercury_trace_internal.c, but for the use of the external debugger.

	Define MR_get_variable_name() that calls get_variable_name/2 defined
	in debugger_interface.m.
1999-05-21 14:38:21 +00:00
Mark Brown
2bbf02daaf Use the same method of input for the browser as for the internal
Estimated hours taken: 5

Use the same method of input for the browser as for the internal
tracer.  Previously, the browser did input via the Mercury library
and the internal tracer did input via readline (if available).  This
did not work properly if files were redirected into stdin, which meant
that test cases could not be written for the browser.  This change
also adds a test case.

browser/util.m:
	Add a predicate, util__trace_getline/4, which does input via
	the same method used by the internal debugger.

browser/parse.m:
	Call util__trace_getline/4 instead of io__read_line/3.

browser/browse.m:
	Pass the prompt to browser/parse.m as a string, rather than
	printing it before calling.

trace/mercury_trace_internal.c:
trace/mercury_trace_internal.h:
	Declare MR_trace_getline extern.

runtime/mercury_init.h:
runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
util/mkinit.c:
	Make MR_trace_getline available to the browser via a function
	pointer.

tests/debugger/Mmakefile:
	Add the new test case.

tests/debugger/browser_test.m:
tests/debugger/browser_test.inp:
tests/debugger/browser_test.exp:
	The new test case.

runtime/mercury_trace_base.c:
runtime/mercury_trace_base.h:
	Export MR_tracing_not_enabled() for use by browser/util.m.
1999-05-14 02:25:53 +00:00
Fergus Henderson
f0d99a5afd Add a couple of comments.
Estimated hours taken: 0.25

browser/parse.m:
browser/frame.m:
	Add a couple of comments.
1999-03-10 20:20:09 +00:00
Bert Thompson
eee1996975 Add a simple term browser for use by the trace-based debugger.
Estimated hours taken: 40

Add a simple term browser for use by the trace-based debugger.

This is minimal but useful browser. Not included in this version
are a scripting language, Windows Explorer-style tree expansion,
and other features not yet thought of.

N.B. This still needs to be hooked into the debugger.

browser/Mmakefile:
	Added target browse_test.

browser/browser_library.m:
	Added modules required for the browser.

browser/browse_test.m:
	A simple driver for the browser with an example
	data structure to browse. (new file)

browser/browse.m:
	The browser proper. (new file)

browser/parse.m:
	Parser for browser's command language. (new file)

browser/util.m:
	Miscellaneous utilities used in the browser code. (new file)

browser/frame.m:
	Bare minimal ASCII graphics frames. (new file)
1998-10-25 07:16:41 +00:00