[m-dev.] compiler generated events

Erwan Jahier Erwan.Jahier at irisa.fr
Thu Feb 25 00:07:48 AEDT 1999


| >From mercury_trace_external.c:
| 
| ** The code for using an external debugger is conditionalized
| ** on MR_USE_EXTERNAL_DEBUGGER (which by default is not enabled)
| ** because it uses sockets, which are not portable.
| ** Ideally we ought to use autoconf for that...
| 
| The reason for that is not efficiency, it is just portability.
| Efficiency-wise, the cost is minimal; almost all the code
| for dealing with the external debugger is in the trace
| library anyway, so there's no serious code space problem.
| So if you fix the portability problem, by using autoconf,
| then MR_USE_EXTERNAL_DEBUGGER can be enabled by default on
| all systems which it is portable to.

something like that?

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/02/24 13:03:36
@@ -1839,6 +1839,38 @@
 AC_SUBST_FILE(PARSE_GRADE_OPTIONS)
 AC_SUBST_FILE(FINAL_GRADE_OPTIONS)
 
+
+#-----------------------------------------------------------------------------
+# test if sockets are available to be able to use Opium-M
+AC_MSG_CHECKING(whether we can use sockets (for Opium-M))
+
+case "$host" in
+       i?86-*-linux|i?86-*-linux-gnu)
+               AC_MSG_RESULT(yes)
+               CC="$CC -DMR_USE_EXTERNAL_DEBUGGER -g "
+               ;;
+       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)        
+               CC="$CC -DMR_USE_EXTERNAL_DEBUGGER -g -lsocket"
+               ;;
+       alpha-dec-osf*)
+               AC_MSG_RESULT(disabled for now because it is untested)
+               ;;
+       *-cygwin*)
+               AC_MSG_RESULT(no)
+               ;;
+       *)
+               AC_MSG_RESULT(no)
+               ;;
+esac
+
+
 #-----------------------------------------------------------------------------
 AC_OUTPUT(Mmake.common scripts/Mmake.vars scripts/mmc scripts/mprof
 scripts/mercury_update_interface scripts/mgnuc scripts/ml

-- 
R1.





More information about the developers mailing list