Estimated hours taken: 0.1
library/debugger_interface.m:
Update a comment: changed the pointer to runtime/mercury_accurate_gc.h
to instead point to runtime/mercury_stack_layout.h.
Estimated hours taken: 24
Add support to the Mercury tracer for interacting with an external
Opium-style debugger via a socket.
TODO: currently there is no way for the debugger to specify
constraints on the arguments for a `forward_move' query.
The current code for doing that doesn't work.
(However, the reporting of arguments to the debugger
for an `output_current' query works fine.)
runtime/mercury_trace.c:
Add code to MR_trace() to open a socket connection to
an external debugger, and to process requests from that
debugger, and send responses back.
runtime/mercury_trace.h:
runtime/mercury_wrapper.c:
Call MR_trace_end() from mercury_runtime_terminate() so that
the external debugger gets notified when the program does
a (normal) exit.
runtime/mercury_stack_layout.h:
Fix a bug where the structures here did not match
the output produced by compiler/stack_layout.m.
library/debugger_interface.m:
New file. Declares the Mercury types used for the debugger
socket interface and defines support routines used by
runtime/mercury_trace.c.
library/io.m:
runtime/mercury_types.h:
Move the definition of MercuryFile from library/io.m to
runtime/mercury_types.h, for use by runtime/mercury_trace.c.
library/io.m:
When printing out values of type `c_pointer', print out
the "<<c_pointer>>" string in single quotes, to ensure
that it has valid syntax for a Prolog or Mercury term.
This is necessary because otherwise c_pointers in procedure
arguments could lead to the Mercury process sending a
syntactically invalid term down the socket to the debugger,
which would then be unable to parse it.
library/library.m:
Add reference to debugger_interface.m, so that it gets
include in libmercury.a.
doc/Mmakefile:
Make sure that the library/debugger_interface.m does *not*
get included in the Mercury library reference manual.
runtime/mercury_wrapper.h:
runtime/mercury_wrapper.c:
runtime/mercury_init.h:
util/mkinit.c:
Declare, define, and initialize pointers to the C functions
exported by library/debugger_interface.m.
(This is to avoid having a circular dependency where the
runtime depends on the library.)
compiler/notes/authors.html:
Add Erwan Jahier.