The x86 soft debugger depends on siginfo_t outside Windows. So if we're
neither building for Windows nor using SA_SIGINFO-style signal handlers,
don't enable the soft debugger. Fixes the build on Haiku.

Cc: Zoltan Varga <var...@gmail.com>

v2 -> v3:
* Enable the soft debugger for Windows as well (uses different code path).
  Pointed out by Zoltan Varga.

v1 -> v2:
* Instead of disabling siginfo_t code inside the soft debugger,
  disable the soft debugger itself.

This commit is licensed under the MIT X11 license.
---
 mono/mini/ChangeLog  |    7 +++++++
 mono/mini/mini-x86.h |    4 ++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog
index 9aced04..2d9bab6 100755
--- a/mono/mini/ChangeLog
+++ b/mono/mini/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-04  Andreas Faerber  <andreas.faer...@web.de>
+
+       * mini-x86.h: Only enable soft debugger when using sigaction or on
+       Windows. Fixes build on Haiku (lacks siginfo_t).
+
+       Code is contributed under MIT/X11 license.
+
 2010-04-02  Andreas Faerber  <andreas.faer...@web.de>
 
        * mini.h, mini-x86.h: Suppress sigaction for Haiku, add support for
diff --git a/mono/mini/mini-x86.h b/mono/mini/mini-x86.h
index 30c8d06..f3680d0 100644
--- a/mono/mini/mini-x86.h
+++ b/mono/mini/mini-x86.h
@@ -294,7 +294,11 @@ typedef struct {
 #define MONO_ARCH_GSHARED_SUPPORTED 1
 #define MONO_ARCH_HAVE_LLVM_IMT_TRAMPOLINE 1
 #define MONO_ARCH_LLVM_SUPPORTED 1
+
+#if defined(MONO_ARCH_USE_SIGACTION) || defined(TARGET_WIN32)
 #define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
+#endif
+
 #define MONO_ARCH_HAVE_FIND_JIT_INFO_EXT 1
 #define MONO_ARCH_HAVE_EXCEPTIONS_INIT 1
 #define MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD 1
-- 
1.7.0.4.297.g6555b1

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to