[Mono-dev] Propose renaming fprintf to g_message

Rolf Bjarne Kvinge rolf at xamarin.com
Wed Jul 18 15:24:18 UTC 2012


Hi,

On Wed, Jul 18, 2012 at 5:19 PM, Stephen Shaw <sshaw at decriptor.com> wrote:

> 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
> (mono/metadata/sgen-gc.c):
> 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));
>

Note that the g_* functions automatically appends "\n", so you need to
remove that part of the string.

Rolf

>
> similar to code found in mono/metadata/threads.c:
> HREAD_DEBUG (g_message ("%s: ignoring main thread %"G_GSIZE_FORMAT,
> __func__, (gsize)thread->tid));
>
> Thanks,
> Stephen Shaw
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120718/99bdb62f/attachment.html>


More information about the Mono-devel-list mailing list