Commit Graph

8 Commits

Author SHA1 Message Date
Peter Ross
c372317c26 Add option --ssdb-trace which allows one to control which modules are traced in
Estimated hours taken: 8
Branches: main

Add option --ssdb-trace which allows one to control which modules are traced in
the ssdebug grade and to what level.

Add option --link-ssdb-libs which allows one to link the ssdebug libraries into
an executable not compiled in a .ssdebug grade.

README.ssdebug:
	Document the new options.

compiler/compile_target_code.m:
compiler/module_cmds.m:
	Use link_ssdb_libs rather than source_to_source_debug.

compiler/globals.m:
	Add ssdb_trace_level.
	Set the correct ssdb_trace_level according to the value
	of source_to_source_debug.

compiler/handle_options.m:
	Determine the value of --ssdb-trace according to the values
	of --ssdb and --force-disable-ssdb.
	Set --link-ssdb-libs to true is --ssdb is set.

compiler/mercury_compile_middle_passes.m:
	Always apply the ssdb transformation pass.

compiler/module_imports.m:
	If the SSDB trace level implies the transformation
	has been done, then import the ssdb module.

compiler/options.m:
	Add ssdb_trace_level and link_ssdb_libs options.

compiler/ssdebug.m:
	Use ssdb_trace_level to determine which transformations are applied
	to which procedures.

	Change the transformation so that it's now aware of which level
	tracing is in effect.

ssdb/ssdb.m:
	Record which level of tracing is applicable at each level of the stack.
	Use that information to decide whether or not to stop at an event.

	Avoid aborts when attempting to install the sigint handler in the C# grade.

	Allow the read_and_execute_cmd code to handle 10 io errors in a row before
	finally quiting, this avoids problems in the C# grade where some keypresses
	lead to transient io errors.
2012-07-19 11:44:13 +00:00
Peter Wang
1fc67cafdd Update a note about SIGINT handling in Mono, which is (will be) fixed
Branches: main

README.ssdebug:
        Update a note about SIGINT handling in Mono, which is (will be) fixed
        in later versions.
2010-11-04 01:36:05 +00:00
Peter Wang
91b78d6738 Make it possible to install and use the csharp.ssdebug grade.
Branches: main

Make it possible to install and use the csharp.ssdebug grade.

Mmake.workspace:
        Never try to link with `mer_rt' in C# grades.

browser/Mmakefile:
mdbcomp/Mmakefile:
ssdb/Mmakefile:
        Use `mmc --make' to install these libraries in `csharp' grades.

        Don't add C libraries to MLLIBS in non-C or asm grades.

browser/Mercury.options:
ssdb/Mercury.options:
        "EXTRA_LIBRARIES-libname" doesn't actually work with `mmc --make',
        but "LIBRARIES-name" does.

library/exception.m:
ssdb/ssdb.m:
        Handle EXCP events in C# grades.

        Trap SIGINT when running ssdb in C# grades.

        Add `exit_process' implementation.

browser/declarative_execution.m:
browser/listing.m:
        Add stubs for C#.

README.CSharp:
        Document the C# backend.

README.DotNet:
        Add a pointer to README.CSharp.

README.Erlang:
README.Java:
        Remove a non-sensical paragraph.

.INSTALL.in:
configure.in:
        Add `--enable-csharp-grade' option.

        Make `configure --enable-ssdebug-grades' add `csharp.ssdebug'
        to the list of library grades.
2010-10-26 04:59:10 +00:00
Peter Wang
a8c7ef74d9 Add configure option `--enable-ssdebug-grades' that appends
Branches: main, 10.04

configure.in:
        Add configure option `--enable-ssdebug-grades' that appends
        hlc.gc.ssdebug and java.ssdebug to LIBGRADES if hlc.gc or java grades
        are also present.

.INSTALL.in:
README.ssdebug:
        Mention the option.
2010-07-30 01:30:41 +00:00
Peter Wang
d97555427c Add an (undocumented) method for ssdebug, to allow debugging of only the
Branches: main, 10.04

Add an (undocumented) method for ssdebug, to allow debugging of only the
initial thread in a multi-threaded program.

ssdb/ssdb.m:
        Make the debugger_state mutable thread-local, so that all threads but
        the initial one can execute as if debugging is disabled.

        Add `pause_debugging' and `resume_debugging' predicates that the user
        must call around calls to `thread.spawn'.  Mercury only supports
        thread-local mutables which inherit their values from the parent
        thread, so when the thread is created the debugger_state mutable must
        be set to `off'.  The predicates may have other uses, too.

README.ssdebug:
        List debugging of multi-threaded programs as a limitation.
2010-06-25 05:37:15 +00:00
Peter Wang
9bb62f4f66 Support configurable command aliases and settings files in ssdebug.
Branches: main, 10.04

Support configurable command aliases and settings files in ssdebug.

ssdb/ssdb.m:
        Add support for aliases (`alias' and `unalias' commands).

        Add support for reading commands from files (`source' command).

        Automatically `source' the files $HOME/.ssdbrc and .ssdbrc at startup,
        if they exist.

        Remove the aliases which are not standard mdb aliases.

        Implement the default command with the special alias `EMPTY'
        (like mdb).

        Implement the command consisting only of an integer with the special
        alias `NUMBER' (like mdb).

        Remove hard-coded aliases from the help text.

        Print specific error messages for invalid command arguments instead
        of printing the help text.

README.ssdebug:
        Document behaviour of sourcing .ssdbrc files.

        Say that ssdb commands act like mdb, except for `list'.
2010-06-22 02:47:10 +00:00
Peter Wang
75eda06081 ssdebug enhancements.
Branches: main, 10.04

ssdebug enhancements.

ssdb/ssdb.m:
        Make `print' (no arguments) print the goal, like mdb, instead of
        printing all variables.

        Make `print *' print all variables.  Add `P' as an alias.

        Use browser to print terms.

        Add `format' and `format_param' commands to set browser parameters.

        Support browsing the goal term with `browse' (no argument).

        Add `return', `level' and `current' commands.

        Support an optional line limit for the `stack' command.

        Support compressing duplicate stack frames in stack traces.

        Support an integer argument to `step' command.

        Treat a bare integer as a `step N' command.

        Support `quit -y' option.

browser/browse.m:
browser/util.m:
trace/mercury_trace_vars.c:
        Move definition of type `unbound' to a public module.

README.ssdebug:
        Note down two more limitations.
2010-06-16 01:29:06 +00:00
Peter Wang
07557a573c Add some documentation for the source-to-source debugger.
Branches: main, 10.04

README.ssdebug:
        Add some documentation for the source-to-source debugger.

NEWS:
README.Java:
        Mention the source-to-source debugger.
2010-06-10 07:00:59 +00:00