[m-dev.] diff: add some comments to browser/debugger_interface.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Sep 15 18:39:37 AEST 1999
Estimated hours taken: 0.5
browser/debugger_interface.m:
Add some comments about possible responses not listed in the
`debugger_response' type.
Workspace: /home/mercury0/fjh/mercury
Index: browser/debugger_interface.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/debugger_interface.m,v
retrieving revision 1.10
diff -u -r1.10 debugger_interface.m
--- debugger_interface.m 1999/05/21 14:38:19 1.10
+++ debugger_interface.m 1999/09/15 08:35:32
@@ -192,7 +192,9 @@
% The debugger_response type is used for response sent
% to the debugger process from the Mercury program being debugged.
-% This type would need to be extended.
+% XXX this type does not yet include all the different possible
+% responses (see below).
+
:- type debugger_response
% sending hello
---> hello % are you there?
@@ -245,6 +247,44 @@
% responses to anything
; error(string)
.
+
+/*
+** In addition to the responses listed in the debugger_response type,
+** MR_print_proc_id_to_socket() sends the following responses.
+** XXX These should be made part of the debugger_response type,
+** but currently some of them can't be, because the format is not right
+** for a Mercury term.
+**
+** The protocol between the debugged Mercury program and the external debugger
+** in response to a `stack' request is as follows:
+** 1) The debugger sends "stack";
+** 2) For each procedure in the stack,
+** the debuggee sends:
+** - level(int) (the level of the procedure in the stack)
+** - detail(unsigned long, unsigned long, unsigned long) if available
+** (the call event number, call sequence number and depth of the goal
+** of the procedure)
+** - a sequence of response to identify the procedure (see below)
+** 3) The debuggee sends "end_stack"
+**
+** The sequence of responses sent to identify a procedure are as follows.
+** For each procedure that is not generated by the compiler, the
+** debuggee sends:
+** - the atom 'pred' or 'func' depending if the procedure is a function
+** or not
+** - proc('string:string'/long-long) (the name of the procedure)
+** XXX this is not valid format for a Mercury term
+** - det(string) (the determinism of the procedure)
+** - def_module(string) (the name of the defining module if different
+** from the current one)
+**
+** For each compiler generated procedures, the debuggee sends:
+** - proc('string for string:string'/long-long) (the name of the
+** compiler-generated procedure)
+** XXX this is not valid format for a Mercury term
+** - def_module(string) (as above)
+** - det(string) (as above)
+*/
%-----------------------------------------------------------------------------%
% send to the debugger (e.g. Opium) the wanted features.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list