Commit Graph

4 Commits

Author SHA1 Message Date
Fergus Henderson
f7df319d0c GNU readline always echos the inputs, so if readline support is
Estimated hours taken: 2

trace/mercury_trace_internal.c:
	GNU readline always echos the inputs, so if readline support is
	enabled, then ignore the MR_echo_commands variable,
	and report an error if the user tries to use `echo off'.
	Also, if we're not using readline, then echo the `echo on' command,
	so that the output will be the same as with readline.

tests/debugger/*.inp:
	Ensure that `echo on' is always the first command.

tests/debugger/*.exp:
tests/debugger/*.exp2:
	Update to reflect the changes to *.inp,
	and to include the echo of the `echo on' command.

	(Also delete the mdb intro banners from *_lib.exp*,
	because mdb is invoked with MERCURY_SUPPRESS_MDB_BANNER=yes.
	The *_lib* files are in fact currently not used, so they should
	probably be just deleted, I think.  But I'll do that as
	a separate change.)
1999-04-08 16:04:27 +00:00
Fergus Henderson
af9b463a58 Implement demangling for instance declarations (i.e. base_typeclass_infos).
Estimated hours taken: 4.5

Implement demangling for instance declarations (i.e. base_typeclass_infos).

compiler/base_typeclass_info.m:
compiler/llds_out.m:
	Change the way name mangling for base_typeclass_infos is done
	to ensure that they can be unambiguously demangled.

util/mdemangle.c:
profiler/demangle.m:
	Add code to demangle base_typeclass_infos.

util/mdemangle.c:
	Fix a bug: if it got part way through demangling a symbol
	before noticing that it had the wrong format, then it would
	sometimes print out a partially demangled version of the
	symbol rather than printing out the original symbol unchanged.

tests/debugger/*.exp*:
	Update the expected output to reflect the new mangling scheme.
	(Really the debugger ought to demangle the names, but
	currently it doesn't.)
1999-02-04 14:58:38 +00:00
Fergus Henderson
1aa8f73934 Change the mdb `print' command so that it invokes the non-interactive
Estimated hours taken: 2.75

Change the mdb `print' command so that it invokes the non-interactive
version of the term browser, and change the way the browser is invoked
so that the browser state is preserved across multiple invocations
of `print' or `browse' in a single mdb session.

browser/browse.m:
	Make `browser_state' an abstract type.
	Add new predicate `browse__init_state' to initialize that ADT.
	Change the interface to `browse__browse' so that it takes and
	returns the old and new browser_states.
	Add a new predicate `browse__print' to replace the old
	`browse__portray_root' predicate; this is the non-interactive
	version of the browser.  It calls io__write_univ if the term
	is small enough, and browse__portray (with flat format) otherwise.
	Export the `browse__print' and `browse__init_state' predicates to C.
	Delete the predicates for formatting terms as strings, since that
	code was a potential double-maintenance problem and was not needed.

library/io.m:
	Export `io__write_univ', for use by browser/browse.m.

trace/mercury_trace_browse.h:
trace/mercury_trace_browse.c:
	New files.  These provide an interface to the browser
	which preserves the browser state in a C static variable.

trace/Mmakefile:
	Add the new files mercury_trace_browse.{h,c} to the appropriate
	file lists.

trace/mercury_trace_internal.c:
	Change the `browse' and `print' mdb commands to use the new
	functions defined in mercury_trace_browse.{h,c} rather than
        calling browser__browse and io__print (respectively), and don't
	print a newline afterwards, since the browser does that itself.
	Delete the old hack to avoid printing out HLDS and ModuleInfo,
	since it's not necessary any more.

doc/user_guide.texi:
	Update the documentation for the `browse' and `print' commands
	to reflect these changes.

tests/debugger/*.exp:
tests/debugger/*.exp2:
	Update the expected output from the debugger to reflect these changes.
1998-11-15 16:47:52 +00:00
Fergus Henderson
f3bd28dc60 Fix some spurious test cases failures for the debugging test cases.
Estimated hours taken: 0.5

Fix some spurious test cases failures for the debugging test cases.

tests/debugger/*.exp2:
	Add alternative expected outputs for the test cases that
	produce different results when built in debug grades (i.e.
	when linked with a library was built with debugging enabled).
1998-11-08 23:42:11 +00:00