For review: Enable by default the use of the external debugger

Erwan Jahier Erwan.Jahier at irisa.fr
Tue Mar 9 21:19:37 AEDT 1999


Estimated hours taken: 5

Enable by default the use of the external debugger on architectures that support
sockets. For the time being, I have only enabled it for systems I was able to 
test.

configure.in:
bindist/bindist.configure.in:
	Define MR_USE_EXTERNAL_DEBUGGER for systems that support sockets.

	Pass down EXTRA_CFLAGS and EXTRA_MLFLAGS the name of the socket
	library that may varies from one system to another.

Mmake.common.in:
	Define EXTRA_CFLAGS and EXTRA_MLFLAGS that 

runtime/mercury_conf.h.in:
runtime/mercury_conf_param.h:
	

Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.35
diff -u -r1.35 Mmake.common.in
--- Mmake.common.in	1998/12/21 11:33:49	1.35
+++ Mmake.common.in	1999/03/09 10:12:05
@@ -197,6 +197,12 @@
 # complicating things.
 LIBRARY_INTERMODULE = yes
 
+# On some systems (Solaris for exemple), we need libraries to be able to 
+# use sockets. The name of the needed libraries is determined by autoconf
+# and passed through those two variables. 
+EXTRA_CFLAGS	= @EXTRA_CFLAGS@
+EXTRA_MLFLAGS	= @EXTRA_MLFLAGS@
+
 #-----------------------------------------------------------------------------#
 
 # The Mmake.params file can be used to override definitions in this file
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.149
diff -u -r1.149 configure.in
--- configure.in	1999/02/21 10:09:31	1.149
+++ configure.in	1999/03/09 10:12:07
@@ -1839,6 +1839,47 @@
 AC_SUBST_FILE(PARSE_GRADE_OPTIONS)
 AC_SUBST_FILE(FINAL_GRADE_OPTIONS)
 
+
+#-----------------------------------------------------------------------------#
+AC_MSG_CHECKING(whether we can use sockets (for Opium-M))
+# test if sockets are available to be able to use Opium-M
+
+EXTRA_CFLAGS=
+EXTRA_MLFLAGS=
+
+# XXX It would be better to use AC_TRY_RUN() to do that
+ 
+case "$host" in
+	i?86-*-linux|i?86-*-linux-gnu)
+		AC_MSG_RESULT(yes)
+		AC_DEFINE(MR_USE_EXTERNAL_DEBUGGER)
+		;;
+	m68*-linux|m68*-linux-gnu)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	i?86-*-freebsd*)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	sparc-sun-solaris2.*)
+		AC_MSG_RESULT(yes)        
+		AC_DEFINE(MR_USE_EXTERNAL_DEBUGGER)
+		EXTRA_CFLAGS=" -lsocket"
+		EXTRA_MLFLAGS=" -lsocket"
+		;;
+	alpha-dec-osf*)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	*-cygwin*)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	*)
+		AC_MSG_RESULT(no)
+		;;
+esac
+
+AC_SUBST(EXTRA_CFLAGS)
+AC_SUBST(EXTRA_MLFLAGS)
+
 #-----------------------------------------------------------------------------#
 AC_OUTPUT(Mmake.common scripts/Mmake.vars scripts/mmc scripts/mprof
 scripts/mercury_update_interface scripts/mgnuc scripts/ml
Index: bindist/bindist.configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.configure.in,v
retrieving revision 1.21
diff -u -r1.21 bindist.configure.in
--- bindist.configure.in	1998/12/22 07:54:12	1.21
+++ bindist.configure.in	1999/03/09 10:12:07
@@ -233,6 +233,46 @@
 
 #-----------------------------------------------------------------------------#
 
+AC_MSG_CHECKING(whether we can use sockets (for Opium-M))
+# test if sockets are available to be able to use Opium-M
+
+EXTRA_CFLAGS=
+EXTRA_MLFLAGS=
+
+# XXX It would be better to use AC_TRY_RUN() to do that
+
+case "$host" in
+	i?86-*-linux|i?86-*-linux-gnu)
+		AC_MSG_RESULT(yes)
+		AC_DEFINE(MR_USE_EXTERNAL_DEBUGGER)
+		;;
+	m68*-linux|m68*-linux-gnu)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	i?86-*-freebsd*)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	sparc-sun-solaris2.*)
+		AC_MSG_RESULT(yes)        
+		AC_DEFINE(MR_USE_EXTERNAL_DEBUGGER)
+		EXTRA_CFLAGS=" -lsocket"
+		EXTRA_MLFLAGS=" -lsocket"
+		;;
+	alpha-dec-osf*)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	*-cygwin*)
+		AC_MSG_RESULT(disabled for now because it is untested)
+		;;
+	*)
+		AC_MSG_RESULT(no)
+		;;
+esac
+
+AC_SUBST(EXTRA_CFLAGS)
+AC_SUBST(EXTRA_MLFLAGS)
+
+#-----------------------------------------------------------------------------#
 AC_OUTPUT(Makefile scripts/mmc scripts/mprof
 scripts/mercury_update_interface scripts/mgnuc scripts/ml
 scripts/mmake scripts/mnc scripts/mnl scripts/mnp scripts/c2init
Index: runtime/mercury_conf.h.in
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_conf.h.in,v
retrieving revision 1.9
diff -u -r1.9 mercury_conf.h.in
--- mercury_conf.h.in	1998/12/15 00:22:11	1.9
+++ mercury_conf.h.in	1999/03/09 10:12:09
@@ -239,6 +239,15 @@
 */
 #undef MR_CAN_DO_PENDING_IO
 
+/*
+** MR_USE_EXTERNAL_DEBUGGER:
+**	Allow MR_trace() to use an external process debugger
+**	(with communication done via a socket interface)
+**	rather than using the debugger that is part of
+**	the Mercury runtime.
+*/
+#undef  MR_USE_EXTERNAL_DEBUGGER
+
 /*---------------------------------------------------------------------------*/
 
 #include "mercury_conf_param.h"
Index: runtime/mercury_conf_param.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_conf_param.h,v
retrieving revision 1.14
diff -u -r1.14 mercury_conf_param.h
--- mercury_conf_param.h	1999/01/11 03:52:05	1.14
+++ mercury_conf_param.h	1999/03/09 10:12:09
@@ -103,13 +103,6 @@
 **	Note that MR_REQUIRE_TRACING is talking about execution tracing,
 **	not stack tracing; these are two independently configurable features.
 **
-** MR_USE_EXTERNAL_DEBUGGER:
-**	Allow MR_trace() to use an external process debugger
-**	(with communication done via a socket interface)
-**	rather than using the debugger that is part of
-**	the Mercury runtime.
-**	[The external debugger has not yet been written.]
-**
 ** MR_LOWLEVEL_DEBUG
 **	Enables various low-level debugging stuff,
 **	that was in the distant past used to debug

-- 
R1.





More information about the developers mailing list