[m-dev.] Minor improvements to the external debugger
Erwan Jahier
Erwan.Jahier at irisa.fr
Wed Oct 27 22:57:44 AEST 1999
Estimated hours taken: 0.2
trace/mercury_trace_external.c:
Conditionalize with MR_debug_socket the printing of the host and
the port of an internet socket connection. The rational for
this change is that it is debugging information; it also makes the
regression tests look different when using unix or inet socket
connection.
Do not abort with fatal_error() but with exit() when an abort
request is sent to the external debugger.
Index: trace/mercury_trace_external.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_external.c,v
retrieving revision 1.25
diff -u -r1.25 mercury_trace_external.c
--- mercury_trace_external.c 1999/10/24 09:57:25 1.25
+++ mercury_trace_external.c 1999/10/27 12:51:52
@@ -271,9 +271,10 @@
"invalid port");
}
- fprintf(stderr, "Mercury runtime: host = %s, port = %d\n",
- hostname, port);
-
+ if (MR_debug_socket) {
+ fprintf(stderr, "Mercury runtime: host = %s, port = %d\n",
+ hostname, port);
+ }
inet_address.sin_family = AF_INET;
inet_address.sin_addr.s_addr = host_addr;
inet_address.sin_port = htons(port);
@@ -444,8 +445,7 @@
&debugger_request, &debugger_request_type);
switch((int) debugger_request_type) {
case MR_REQUEST_ABORT_PROG:
- fatal_error("aborting the execution on "
- "user request");
+ exit(EXIT_SUCCESS);
case MR_REQUEST_FORWARD_MOVE:
if (MR_debug_socket) {
--
R1.
--------------------------------------------------------------------------
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