-/*
- * This is used by the Mono Debugger to stop/start the world.
- */
-GCThreadFunctions pthread_thread_vtable = {
- pthread_stop_init,
-
- pthread_stop_world,
- pthread_push_all_stacks,
- pthread_start_world
-};
-
-GCThreadFunctions *gc_thread_vtable = &pthread_thread_vtable;
+#ifdef MONO_DEBUGGER_SUPPORTED
+
+GCThreadFunctions *gc_thread_vtable = NULL;
+
+void
+GC_mono_debugger_add_all_threads (void)
+{
+ GC_thread p;
+ int i;
+
+ if (gc_thread_vtable && gc_thread_vtable->thread_created) {
+ for (i = 0; i < THREAD_TABLE_SZ; i++) {
+ for (p = GC_threads[i]; p != 0; p = p -> next) {
+ gc_thread_vtable->thread_created (p->id, &p->stop_info.stack_ptr);
+ }
+ }
+ }
+}
+
+#endif