[mini] Handle magic interfaces in common_trampoline as if they were variant.
[mono.git] / mono / mini / trace.c
index 95c860902337d51aa113de03ce00649e255d807b..0e50ae550707597de0aee029b8dc9cdda3829405 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * trace.c: Tracing facilities for the Mono Runtime.
+/**
+ * \file
+ * Tracing facilities for the Mono Runtime.
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -25,7 +26,7 @@
 #include <mono/utils/mono-memory-model.h>
 #include "trace.h"
 
-#if defined (PLATFORM_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
+#if defined (HOST_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
 #  undef printf
 #  define printf(...) g_log("mono", G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
 #  undef fprintf
@@ -132,11 +133,12 @@ mono_trace_eval (MonoMethod *method)
                case MONO_TRACEOP_EXCEPTION:
                        break;
                }
-               if (op->exclude){
+               if (op->exclude) {
                        if (inc)
                                include = 0;
-               } else if (inc)
+               } else if (inc) {
                        include = 1;
+               }
        }
        return include;
 }
@@ -165,9 +167,10 @@ static void get_string (void)
        }
        if (value != NULL)
                g_free (value);
-       value = (char *)g_malloc (input - start + 1);
-       strncpy (value, start, input-start);
-       value [input-start] = 0;
+       size_t len = input - start;
+       value = (char *)g_malloc (len + 1);
+       memcpy (value, start, len);
+       value [len] = 0;
 }
 
 enum Token {