Index: mono/metadata/mono-debug-debugger.h =================================================================== --- mono/metadata/mono-debug-debugger.h (revision 55944) +++ mono/metadata/mono-debug-debugger.h (working copy) @@ -50,7 +50,7 @@ */ extern guint8 *mono_trampoline_code []; -#if !defined(__WIN32__) +#ifdef MONO_DEBUGGER_SUPPORTED /* * Functions we export to the debugger. Index: mono/mini/driver.c =================================================================== --- mono/mini/driver.c (revision 55938) +++ mono/mini/driver.c (working copy) @@ -852,8 +852,13 @@ opt |= MONO_OPT_SHARED; enable_debugging = TRUE; +#if MONO_DEBUGGER_SUPPORTED mono_debug_init (MONO_DEBUG_FORMAT_DEBUGGER); mono_debugger_init (); +#else + g_print ("The Mono Debugger is not supported on this platform.\n"); + return 1; +#endif } mono_set_defaults (mini_verbose, opt); @@ -967,6 +972,7 @@ mini_cleanup (domain); return 0; } else if (action == DO_DEBUGGER) { +#if MONO_DEBUGGER_SUPPORTED const char *error; error = mono_check_corlib_version (); @@ -979,6 +985,9 @@ mono_debugger_main (domain, assembly, argc, argv); mini_cleanup (domain); return 0; +#else + return 1; +#endif } desc = mono_method_desc_new (mname, 0); if (!desc) { Index: mono/mini/debug-debugger.c =================================================================== --- mono/mini/debug-debugger.c (revision 55939) +++ mono/mini/debug-debugger.c (working copy) @@ -1,4 +1,4 @@ -#if defined(__i386__) || defined(__x86_64__) +#include #include #include #include @@ -414,28 +414,3 @@ return 0; } - -#else /* defined(__x86__) || defined(__x86_64__) */ -/* - * We're on an unsupported platform for the debugger. - */ -#include "mini.h" - -void -mono_debugger_init (void) -{ - /* - * This method is only called when we're running inside the Mono Debugger, but - * since the debugger doesn't work on this platform, this line should never be reached. - */ - g_error ("The Mono Debugger is not supported on this platform."); -} - -int -mono_debugger_main (MonoDomain *domain, MonoAssembly *assembly, int argc, char **argv) -{ - g_assert_not_reached (); - return 0; -} - -#endif Index: mono/mini/Makefile.am =================================================================== --- mono/mini/Makefile.am (revision 55938) +++ mono/mini/Makefile.am (working copy) @@ -198,7 +198,6 @@ ssapre-mini-ops.h \ driver.c \ debug-mini.c \ - debug-debugger.c\ linear-scan.c \ aot.c \ graph.c \ @@ -222,13 +221,19 @@ test_sources2 = generics.2.cs +if MONO_DEBUGGER_SUPPORTED +mono_debugger_sources = debug-debugger.c +else +mono_debugger_sources = +endif + regtests=basic.exe arrays.exe basic-float.exe basic-math.exe basic-long.exe objects.exe basic-calls.exe iltests.exe exceptions.exe bench.exe regtests2=generics.exe common_BURGSRC= $(srcdir)/inssel.brg $(srcdir)/inssel-float.brg if X86 libmono_la_SOURCES = \ - $(common_sources) $(x86_sources) + $(common_sources) $(x86_sources) $(mono_debugger_sources) arch_BURGSRC= $(srcdir)/inssel-long32.brg $(srcdir)/inssel-x86.brg arch_built=cpu-pentium.h @@ -236,7 +241,7 @@ if AMD64 libmono_la_SOURCES = \ - $(common_sources) $(amd64_sources) + $(common_sources) $(amd64_sources) $(mono_debugger_sources) arch_BURGSRC= $(srcdir)/inssel-long.brg $(srcdir)/inssel-amd64.brg arch_built=cpu-amd64.h endif Index: configure.in =================================================================== --- configure.in (revision 55938) +++ configure.in (working copy) @@ -1643,6 +1643,22 @@ fi fi +mono_debugger_supported=no +if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then + case "$host" in + *-*-*linux*) + mono_debugger_supported=yes + ;; + esac +fi + +AC_MSG_CHECKING(if the Mono Debugger is supported on this platform) +if test "x$mono_debugger_supported" = "xyes"; then + AC_DEFINE(MONO_DEBUGGER_SUPPORTED,1,[The Mono Debugger is supported on this platform]) +fi +AC_MSG_RESULT($mono_debugger_supported) +AM_CONDITIONAL(MONO_DEBUGGER_SUPPORTED, test x$mono_debugger_supported = xyes) + if test "x$with_tls" = "x__thread"; then AC_DEFINE(HAVE_KW_THREAD) # Pass the information to libgc Index: ChangeLog =================================================================== --- ChangeLog (revision 55938) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2006-01-23 Martin Baulig + + * configure.in: Added configure check whether the Mono Debugger is + supported on this platform; AC_DEFINE(MONO_DEBUGGER_SUPPORTED) and + also added a `MONO_DEBUGGER_SUPPORTED' automake conditional. + 2006-01-13 Raja R Harinath * data/net_2_0/machine.config: Fix a couple of typos in type names.