move the call to mono_gc_base_init into mono_debug_init
commit54e37da2c0e81616785a1c26b38235e9a2c5071f
authorChris Toshok <toshok@gmail.com>
Thu, 9 Sep 2010 17:08:59 +0000 (9 10:08 -0700)
committerChris Toshok <toshok@gmail.com>
Thu, 9 Sep 2010 18:53:50 +0000 (9 11:53 -0700)
tree099c4677c3c7f6201ac71ce3d6eacb0be63d0991
parent53fb1fbdb886e31f210a06fecc6961837ad9d095
move the call to mono_gc_base_init into mono_debug_init

mono_debug_init is a public embedding interface and calls into
mono_debugger_initialize, which registers a GC root.  driver.c calls
mono_gc_base_init before calling mono_debug_init for this reason, but
that's not an option for embedding (as mono_gc_base_init is internal.)

since mono_gc_base_init is idempotent, just add a call to
mono_debug_init (and remove the driver.c call).  Document (in sgen-gc
and sgen-gc.h) the fact that although mono_gc_base_init is idempotent,
changing LOCK_INIT to something non-idempotent will break this.
mono/metadata/mono-debug.c
mono/metadata/sgen-gc.c
mono/metadata/sgen-gc.h
mono/mini/driver.c