Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Redirect console output for iOS/Android when tracing.

	* trace.c: Given the quite complex usage of printf by
	the tracing code, we resort to a simple hack to do it.
  • Loading branch information...
commit 8d9fa2b2ec452ee9bfec49201496131da4e3e9c0 1 parent da3a1b5
@kumpera kumpera authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 mono/mini/trace.c
7 mono/mini/trace.c
@@ -24,6 +24,13 @@
#include <mono/utils/mono-time.h>
#include "trace.h"
+#if defined (PLATFORM_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
+# undef printf
+# define printf(...) g_log("mono", G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
+# undef fprintf
+# define fprintf(__ignore, ...) g_log ("mono-gc", G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
static MonoTraceSpec trace_spec;
Please sign in to comment.
Something went wrong with that request. Please try again.