[Mono-dev] Propose renaming fprintf to g_message

Stephen Shaw sshaw at decriptor.com
Wed Jul 18 15:19:46 UTC 2012

As I understand it, fprintf doesn't work on all platform or at least
on android.  I've been looking specifically at the sgen code and as
I'm trying to figure out what exactly is happening on the heap.  From
what I understand in some places there are #define statements, but
that seems really messy and essentially just a hack :)

I'm proposing that where ever there are fprintf statements such as
DEBUG (4, fprintf (gc_debug_file, "Need to cleanup object %p\n", start));

be rewritten like this:
DEBUG (4, g_message (gc_debug_file, "Need to cleanup object %p\n", start));

similar to code found in mono/metadata/threads.c:
HREAD_DEBUG (g_message ("%s: ignoring main thread %"G_GSIZE_FORMAT,
__func__, (gsize)thread->tid));

Stephen Shaw

More information about the Mono-devel-list mailing list