2009-02-03 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Tue, 3 Feb 2009 21:37:17 +0000 (21:37 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 3 Feb 2009 21:37:17 +0000 (21:37 -0000)
* aot-compiler.c (emit_exception_debug_info): Control the emission of
unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.

* mini.c (mini_method_compile): Ditto.

svn path=/trunk/mono/; revision=125599

mono/mini/ChangeLog
mono/mini/aot-compiler.c
mono/mini/mini-amd64.h
mono/mini/mini.c

index 76b8a3121ccf089a6019ee54158c93206226e98d..200b473f22836ebc57225c0bb5552bb5b7b05dd1 100644 (file)
@@ -1,5 +1,10 @@
 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
 
+       * aot-compiler.c (emit_exception_debug_info): Control the emission of
+       unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
+
+       * mini.c (mini_method_compile): Ditto.
+       
        * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
        the variable index.
 
index 90efeb675a4edf0ead0b05847961319d681f1ce9..c3d65be2bd71ec3325ad12a3731e7ee486c780c5 100644 (file)
@@ -3509,7 +3509,7 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
        buf_size = header->num_clauses * 256 + debug_info_size + 256;
        p = buf = g_malloc (buf_size);
 
-#if defined(__x86_64__)
+#ifdef MONO_ARCH_HAVE_XP_UNWIND
        use_unwind_ops = cfg->unwind_ops != NULL;
 #endif
 
index a52eb2d07afe29d8cc2b6e0cbc59e81946f5862d..939109f9e0d24d1eeb9d98b5afda32e2a0071dc5 100644 (file)
@@ -320,6 +320,7 @@ typedef struct {
 #define MONO_ARCH_ENABLE_GLOBAL_RA 1
 #define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
 #define MONO_ARCH_HAVE_LIVERANGE_OPS 1
+#define MONO_ARCH_HAVE_XP_UNWIND 1
 #if !defined(PLATFORM_WIN32) && !defined(HAVE_MOVING_COLLECTOR)
 #define MONO_ARCH_MONITOR_OBJECT_REG AMD64_RDI
 #endif
index a356074e14dc4eb6944be86fc355f87e4fa9c565..0675b88825d237f2bf2d5336e0423921aa7b81c5 100644 (file)
@@ -3699,6 +3699,11 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                }
        }
 
+       /* 
+        * Its possible to generate dwarf unwind info for xdebug etc, but not actually
+        * using it during runtime, hence the define.
+        */
+#ifdef MONO_ARCH_HAVE_XP_UNWIND
        if (cfg->unwind_ops) {
                guint32 info_len;
                guint8 *unwind_info = mono_unwind_ops_encode (cfg->unwind_ops, &info_len);
@@ -3706,6 +3711,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
                jinfo->used_regs = mono_cache_unwind_info (unwind_info, info_len);
                g_free (unwind_info);
        }
+#endif
 
        cfg->jit_info = jinfo;
 #if defined(__arm__)